Skip to content

Commit

Permalink
fix: now onboarding will show up in correct times (#8214)
Browse files Browse the repository at this point in the history
Feature table was not appearing, when onboarding flag was off.
  • Loading branch information
sjaanus authored Sep 23, 2024
1 parent 1296327 commit 553e049
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ export const ProjectFeatureToggles = ({

const isPlaceholder = Boolean(initialLoad || (loading && total));

const isOnboarded =
onboardingUIEnabled && project.onboardingStatus.status === 'onboarded';
const isNotOnboarded =
const notOnboarding =
!onboardingUIEnabled ||
(onboardingUIEnabled &&
project.onboardingStatus.status === 'onboarded');
const isOnboarding =
onboardingUIEnabled && project.onboardingStatus.status !== 'onboarded';
const hasFeaturesOrOnboarded =
(total !== undefined && total > 0) || isOnboarded;
const showFeaturesTable =
(total !== undefined && total > 0) || notOnboarding;

const columns = useMemo(
() => [
Expand Down Expand Up @@ -406,7 +408,7 @@ export const ProjectFeatureToggles = ({
return (
<Container>
<ConditionallyRender
condition={isNotOnboarded}
condition={isOnboarding}
show={
<ProjectOnboarding
projectId={projectId}
Expand All @@ -415,7 +417,7 @@ export const ProjectFeatureToggles = ({
}
/>
<ConditionallyRender
condition={hasFeaturesOrOnboarded}
condition={showFeaturesTable}
show={
<PageContent
disableLoading
Expand Down

0 comments on commit 553e049

Please sign in to comment.