🎨 Code format & cleanup

This commit is contained in:
Philipp Stracker 2024-11-21 19:28:08 +01:00
parent 3b3bb29428
commit a95296b8ed
No known key found for this signature in database
4 changed files with 28 additions and 43 deletions

View file

@ -1,18 +1,13 @@
import { __ } from '@wordpress/i18n';
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader'; import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
import SelectBoxWrapper from '../../ReusableComponents/SelectBoxWrapper'; import SelectBoxWrapper from '../../ReusableComponents/SelectBoxWrapper';
import SelectBox from '../../ReusableComponents/SelectBox'; import SelectBox from '../../ReusableComponents/SelectBox';
import { __ } from '@wordpress/i18n';
import PaymentMethodIcons from '../../ReusableComponents/PaymentMethodIcons';
import { OnboardingHooks, BUSINESS_TYPES } from '../../../data'; import { OnboardingHooks, BUSINESS_TYPES } from '../../../data';
const BUSINESS_RADIO_GROUP_NAME = 'business'; const BUSINESS_RADIO_GROUP_NAME = 'business';
const StepBusiness = ( { const StepBusiness = ( {} ) => {
setStep,
currentStep,
stepperOrder,
setCompleted,
} ) => {
const { isCasualSeller, setIsCasualSeller } = OnboardingHooks.useBusiness(); const { isCasualSeller, setIsCasualSeller } = OnboardingHooks.useBusiness();
const handleSellerTypeChange = ( value ) => { const handleSellerTypeChange = ( value ) => {
@ -39,23 +34,22 @@ const StepBusiness = ( {
/> />
<div className="ppcp-r-inner-container"> <div className="ppcp-r-inner-container">
<SelectBoxWrapper> <SelectBoxWrapper>
<SelectBox <SelectBox
title={ __( title={ __(
'Business', 'Business',
'woocommerce-paypal-payments' 'woocommerce-paypal-payments'
) } ) }
description={ __( description={ __(
'Recommended for individuals and organizations that primarily use PayPal to sell goods or services or receive donations, even if your business is not incorporated.', 'Recommended for individuals and organizations that primarily use PayPal to sell goods or services or receive donations, even if your business is not incorporated.',
'woocommerce-paypal-payments' 'woocommerce-paypal-payments'
) } ) }
name={ BUSINESS_RADIO_GROUP_NAME } name={ BUSINESS_RADIO_GROUP_NAME }
value={ BUSINESS_TYPES.BUSINESS } value={ BUSINESS_TYPES.BUSINESS }
changeCallback={ handleSellerTypeChange } changeCallback={ handleSellerTypeChange }
currentValue={ getCurrentValue() } currentValue={ getCurrentValue() }
checked={ isCasualSeller === false } checked={ isCasualSeller === false }
type="radio" type="radio"
> ></SelectBox>
</SelectBox>
<SelectBox <SelectBox
title={ __( title={ __(
'Personal Account', 'Personal Account',
@ -71,8 +65,7 @@ const StepBusiness = ( {
currentValue={ getCurrentValue() } currentValue={ getCurrentValue() }
checked={ isCasualSeller === true } checked={ isCasualSeller === true }
type="radio" type="radio"
> ></SelectBox>
</SelectBox>
</SelectBoxWrapper> </SelectBoxWrapper>
</div> </div>
</div> </div>

View file

@ -1,13 +1,9 @@
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
import { __ } from '@wordpress/i18n'; import { __ } from '@wordpress/i18n';
import { Button, Icon } from '@wordpress/components'; import { Button, Icon } from '@wordpress/components';
const StepCompleteSetup = ( { import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
setStep,
currentStep, const StepCompleteSetup = ( { setCompleted } ) => {
stepperOrder,
setCompleted,
} ) => {
const ButtonIcon = () => ( const ButtonIcon = () => (
<Icon <Icon
icon={ () => ( icon={ () => (

View file

@ -1,17 +1,13 @@
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
import { __ } from '@wordpress/i18n'; import { __ } from '@wordpress/i18n';
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
import SelectBox from '../../ReusableComponents/SelectBox'; import SelectBox from '../../ReusableComponents/SelectBox';
import SelectBoxWrapper from '../../ReusableComponents/SelectBoxWrapper'; import SelectBoxWrapper from '../../ReusableComponents/SelectBoxWrapper';
import { OnboardingHooks, PRODUCT_TYPES } from '../../../data'; import { OnboardingHooks, PRODUCT_TYPES } from '../../../data';
const PRODUCTS_CHECKBOX_GROUP_NAME = 'products'; const PRODUCTS_CHECKBOX_GROUP_NAME = 'products';
const StepProducts = ( { const StepProducts = () => {
setStep,
currentStep,
stepperOrder,
setCompleted,
} ) => {
const { products, toggleProduct } = OnboardingHooks.useProducts(); const { products, toggleProduct } = OnboardingHooks.useProducts();
return ( return (

View file

@ -1,13 +1,13 @@
import { __, sprintf } from '@wordpress/i18n'; import { __ } from '@wordpress/i18n';
import { Button } from '@wordpress/components'; import { Button } from '@wordpress/components';
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader'; import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
import PaymentMethodIcons from '../../ReusableComponents/PaymentMethodIcons'; import PaymentMethodIcons from '../../ReusableComponents/PaymentMethodIcons';
import Separator from '../../ReusableComponents/Separator'; import Separator from '../../ReusableComponents/Separator';
import WelcomeDocs from '../../ReusableComponents/WelcomeDocs/WelcomeDocs'; import WelcomeDocs from '../../ReusableComponents/WelcomeDocs/WelcomeDocs';
import AccordionSection from '../../ReusableComponents/AccordionSection';
import AdvancedOptionsForm from './Components/AdvancedOptionsForm'; import AdvancedOptionsForm from './Components/AdvancedOptionsForm';
import AccordionSection from '../../ReusableComponents/AccordionSection';
const StepWelcome = ( { setStep, currentStep, setCompleted } ) => { const StepWelcome = ( { setStep, currentStep, setCompleted } ) => {
return ( return (