From 12f101f52ac5ace0e6b01554cecae41ce47fae74 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Tue, 11 Jun 2024 18:01:56 +0530 Subject: [PATCH] fix: dashboard empty state flicker (#4755) --- web/core/components/page-views/workspace-dashboard.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/core/components/page-views/workspace-dashboard.tsx b/web/core/components/page-views/workspace-dashboard.tsx index be163c0bb2..f25a1ffefc 100644 --- a/web/core/components/page-views/workspace-dashboard.tsx +++ b/web/core/components/page-views/workspace-dashboard.tsx @@ -35,7 +35,7 @@ export const WorkspaceDashboardView = observer(() => { const { data: currentUserProfile, updateTourCompleted } = useUserProfile(); const { captureEvent } = useEventTracker(); const { homeDashboardId, fetchHomeDashboardWidgets } = useDashboard(); - const { joinedProjectIds } = useProject(); + const { joinedProjectIds, loader } = useProject(); const [windowWidth] = useSize(); @@ -59,6 +59,7 @@ export const WorkspaceDashboardView = observer(() => { fetchHomeDashboardWidgets(workspaceSlug); }, [fetchHomeDashboardWidgets, workspaceSlug]); + // TODO: refactor loader implementation return ( <> {currentUserProfile && !currentUserProfile.is_tour_completed && ( @@ -68,7 +69,7 @@ export const WorkspaceDashboardView = observer(() => { )} {homeDashboardId && joinedProjectIds && ( <> - {joinedProjectIds.length > 0 ? ( + {joinedProjectIds.length > 0 || loader ? ( <>