-
Notifications
You must be signed in to change notification settings - Fork 50
Component cleanup: Icons, paths, links, code style (3928) #3319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,9 @@ const filterSteps = ( steps, conditions ) => { | |
}; | ||
|
||
export const getSteps = ( flags ) => { | ||
// eslint-disable-next-line react-hooks/rules-of-hooks | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of ignoring the "rules-of-hooks" check:
The current mix of receiving input arguments and collecting other details via hooks is a bit messy |
||
const { ownBrandOnly } = CommonHooks.useWooSettings(); | ||
// eslint-disable-next-line react-hooks/rules-of-hooks | ||
const { isCasualSeller } = OnboardingHooks.useBusiness(); | ||
|
||
const steps = filterSteps( ALL_STEPS, [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,10 @@ const ACTIVITIES = { | |
|
||
export const useHandleOnboardingButton = ( isSandbox ) => { | ||
const { onboardingUrl } = isSandbox | ||
? CommonHooks.useSandbox() | ||
: CommonHooks.useProduction(); | ||
? // eslint-disable-next-line react-hooks/rules-of-hooks | ||
CommonHooks.useSandbox() | ||
: // eslint-disable-next-line react-hooks/rules-of-hooks | ||
CommonHooks.useProduction(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of ignoring these warnings, I think it would be better to correct the code to call hooks unconditionally: const sandboxData = CommonHooks.useSandbox();
const productionData = CommonHooks.useProduction();
const { onboardingUrl } = isSandbox ? sandboxData : productionData; |
||
const { ownBrandOnly } = CommonHooks.useWooSettings(); | ||
const { products, options } = | ||
OnboardingHooks.useDetermineProducts( ownBrandOnly ); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍