♻️ Extract onboarding state to custom hooks

This commit is contained in:
Philipp Stracker 2024-10-30 17:33:48 +01:00
parent cff9919c78
commit 6e3664ade8
No known key found for this signature in database
4 changed files with 69 additions and 22 deletions

View file

@ -4,7 +4,7 @@ import { Button, TextControl } from '@wordpress/components';
import PaymentMethodIcons from '../../ReusableComponents/PaymentMethodIcons';
import SettingsToggleBlock from '../../ReusableComponents/SettingsToggleBlock';
import Separator from '../../ReusableComponents/Separator';
import { useOnboardingDetails } from '../../../data';
import { useOnboardingStepWelcome } from '../../../data';
import DataStoreControl from '../../ReusableComponents/DataStoreControl';
const StepWelcome = ( { setStep, currentStep } ) => {
@ -84,7 +84,7 @@ const WelcomeForm = () => {
setClientId,
clientSecret,
setClientSecret,
} = useOnboardingDetails();
} = useOnboardingStepWelcome();
const advancedUsersDescription = sprintf(
// translators: %s: Link to PayPal REST application guide