From e945aa9b71f029837599bf1ae96d9e5c659ffa26 Mon Sep 17 00:00:00 2001 From: "onFire(Abhi)" <40654066+AbhiShake1@users.noreply.github.com> Date: Mon, 20 Nov 2023 09:06:46 +0000 Subject: [PATCH] fix: newly added cycle doesnt appear unlelss the page is manually reloaded (#2673) * fix: newly added cycle doesnt appear unlelss the page is manually reloaded * Delete \ * Delete web/layouts/profile-layout/profile-sidebar.tsx * Update cycles.store.ts * fix: remove duplicate type declaration --------- Co-authored-by: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> --- .../[workspaceSlug]/projects/[projectId]/cycles/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx index c1314b414..9df2357b8 100644 --- a/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx +++ b/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx @@ -28,7 +28,7 @@ const ProjectCyclesPage: NextPageWithLayout = observer(() => { const [createModal, setCreateModal] = useState(false); // store const { project: projectStore, cycle: cycleStore } = useMobxStore(); - const { currentProjectDetails } = projectStore; + const { projectCycles } = cycleStore // router const router = useRouter(); const { workspaceSlug, projectId, peekCycle } = router.query; @@ -73,6 +73,7 @@ const ProjectCyclesPage: NextPageWithLayout = observer(() => { const cycleView = cycleStore?.cycleView; const cycleLayout = cycleStore?.cycleLayout; + const totalCycles = projectCycles?.length ?? 0 if (!workspaceSlug || !projectId) return null; @@ -84,7 +85,7 @@ const ProjectCyclesPage: NextPageWithLayout = observer(() => { isOpen={createModal} handleClose={() => setCreateModal(false)} /> - {currentProjectDetails?.total_cycles === 0 ? ( + {totalCycles === 0 ? (