Skip to content

Commit

Permalink
fix: newly added cycle doesnt appear unlelss the page is manually rel…
Browse files Browse the repository at this point in the history
…oaded (#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>
  • Loading branch information
2 people authored and sriramveeraghanta committed Dec 7, 2023
1 parent 78fee22 commit b210fc8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand All @@ -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"
Expand Down

0 comments on commit b210fc8

Please # to comment.