From 84c11f1b3d5c5af06c7b2f49a6bf5f0230652d06 Mon Sep 17 00:00:00 2001 From: Bohdan Imiela Date: Thu, 19 Dec 2024 09:10:31 +0100 Subject: [PATCH] refactor: simplify condition --- .../src/features/onboarding/OnboardingGuide.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/slice-machine/src/features/onboarding/OnboardingGuide.tsx b/packages/slice-machine/src/features/onboarding/OnboardingGuide.tsx index 1c9e90829..2e0c907df 100644 --- a/packages/slice-machine/src/features/onboarding/OnboardingGuide.tsx +++ b/packages/slice-machine/src/features/onboarding/OnboardingGuide.tsx @@ -9,8 +9,9 @@ export function OnboardingGuide() { const isVisible = useIsOnboardingGuideVisible(); const isSharedExperimentEligible = useSharedOnboardingExperiment().eligible; - if (!isVisible) return null; - return isSharedExperimentEligible ? : null; + return isVisible && isSharedExperimentEligible ? ( + + ) : null; } function useIsOnboardingGuideVisible() {