From 553e04994e51b6b306588aa2c860a8c615b45f08 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Mon, 23 Sep 2024 12:57:47 +0300 Subject: [PATCH] fix: now onboarding will show up in correct times (#8214) Feature table was not appearing, when onboarding flag was off. --- .../ProjectFeatureToggles.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.tsx b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.tsx index d3e2e485c3b2..34e3caa4b841 100644 --- a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.tsx +++ b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.tsx @@ -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( () => [ @@ -406,7 +408,7 @@ export const ProjectFeatureToggles = ({ return (