forked from github/plane
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>
This commit is contained in:
parent
6595a387d0
commit
e945aa9b71
@ -28,7 +28,7 @@ const ProjectCyclesPage: NextPageWithLayout = observer(() => {
|
|||||||
const [createModal, setCreateModal] = useState(false);
|
const [createModal, setCreateModal] = useState(false);
|
||||||
// store
|
// store
|
||||||
const { project: projectStore, cycle: cycleStore } = useMobxStore();
|
const { project: projectStore, cycle: cycleStore } = useMobxStore();
|
||||||
const { currentProjectDetails } = projectStore;
|
const { projectCycles } = cycleStore
|
||||||
// router
|
// router
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { workspaceSlug, projectId, peekCycle } = router.query;
|
const { workspaceSlug, projectId, peekCycle } = router.query;
|
||||||
@ -73,6 +73,7 @@ const ProjectCyclesPage: NextPageWithLayout = observer(() => {
|
|||||||
|
|
||||||
const cycleView = cycleStore?.cycleView;
|
const cycleView = cycleStore?.cycleView;
|
||||||
const cycleLayout = cycleStore?.cycleLayout;
|
const cycleLayout = cycleStore?.cycleLayout;
|
||||||
|
const totalCycles = projectCycles?.length ?? 0
|
||||||
|
|
||||||
if (!workspaceSlug || !projectId) return null;
|
if (!workspaceSlug || !projectId) return null;
|
||||||
|
|
||||||
@ -84,7 +85,7 @@ const ProjectCyclesPage: NextPageWithLayout = observer(() => {
|
|||||||
isOpen={createModal}
|
isOpen={createModal}
|
||||||
handleClose={() => setCreateModal(false)}
|
handleClose={() => setCreateModal(false)}
|
||||||
/>
|
/>
|
||||||
{currentProjectDetails?.total_cycles === 0 ? (
|
{totalCycles === 0 ? (
|
||||||
<div className="h-full grid place-items-center">
|
<div className="h-full grid place-items-center">
|
||||||
<EmptyState
|
<EmptyState
|
||||||
title="Plan your project with cycles"
|
title="Plan your project with cycles"
|
||||||
|
Loading…
Reference in New Issue
Block a user