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:
onFire(Abhi) 2023-11-20 09:06:46 +00:00 committed by GitHub
parent 6595a387d0
commit e945aa9b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ? (
<div className="h-full grid place-items-center">
<EmptyState
title="Plan your project with cycles"