fix: dashboard empty state flicker (#4755)

This commit is contained in:
Anmol Singh Bhatia 2024-06-11 18:01:56 +05:30 committed by GitHub
parent e3ebb9b61c
commit 12f101f52a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 ? (
<>
<IssuePeekOverview />
<div