Skip to content

Commit

Permalink
refactor: simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
BohdanOne committed Dec 19, 2024
1 parent c973924 commit 84c11f1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ export function OnboardingGuide() {
const isVisible = useIsOnboardingGuideVisible();
const isSharedExperimentEligible = useSharedOnboardingExperiment().eligible;

if (!isVisible) return null;
return isSharedExperimentEligible ? <SharedOnboardingGuide /> : null;
return isVisible && isSharedExperimentEligible ? (
<SharedOnboardingGuide />
) : null;
}

function useIsOnboardingGuideVisible() {
Expand Down

0 comments on commit 84c11f1

Please sign in to comment.