From 8b9d0148192c37c7e8933d10593d4f87ce723717 Mon Sep 17 00:00:00 2001 From: Carlos Miceli Date: Thu, 26 Sep 2024 15:29:24 -0300 Subject: [PATCH] fix lint --- src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx b/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx index e1148d5fc349..eaac1ad5825f 100644 --- a/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx +++ b/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx @@ -45,15 +45,13 @@ function BaseOnboardingPurpose({shouldUseNativeStyles, shouldEnableMaxHeight, ro const theme = useTheme(); const [onboardingErrorMessage, onboardingErrorMessageResult] = useOnyx(ONYXKEYS.ONBOARDING_ERROR_MESSAGE); - const customChoices = useOnyx(ONYXKEYS.ONBOARDING_CUSTOM_CHOICES)[0] || []; - - const onboardingChoices = customChoices.length > 0 - ? Object.values(CONST.SELECTABLE_ONBOARDING_CHOICES).filter(choice => customChoices.includes(choice)) - : Object.values(CONST.SELECTABLE_ONBOARDING_CHOICES) const maxHeight = shouldEnableMaxHeight ? windowHeight : undefined; const paddingHorizontal = onboardingIsMediumOrLargerScreenWidth ? styles.ph8 : styles.ph5; + const customChoices = useOnyx(ONYXKEYS.ONBOARDING_CUSTOM_CHOICES)[0] ?? []; + const onboardingChoices = customChoices.length > 0 ? Object.values(CONST.SELECTABLE_ONBOARDING_CHOICES).filter((choice) => customChoices.includes(choice)) : Object.values(CONST.SELECTABLE_ONBOARDING_CHOICES); + const menuItems: MenuItemProps[] = onboardingChoices.map((choice) => { const translationKey = `onboarding.purpose.${choice}` as const; return {