Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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