diff --git a/web/components/cycles/board/root.tsx b/web/components/cycles/board/root.tsx index 26154becf..e9fde3428 100644 --- a/web/components/cycles/board/root.tsx +++ b/web/components/cycles/board/root.tsx @@ -22,12 +22,14 @@ export const CyclesBoard: FC = observer((props) => {
- + {cycleIds.length > 0 && ( + + )} {completedCycleIds.length !== 0 && ( diff --git a/web/components/cycles/cycles-view-header.tsx b/web/components/cycles/cycles-view-header.tsx index f7ff3567c..737d36f3f 100644 --- a/web/components/cycles/cycles-view-header.tsx +++ b/web/components/cycles/cycles-view-header.tsx @@ -42,6 +42,8 @@ export const CyclesViewHeader: React.FC = observer((props) => { useOutsideClickDetector(inputRef, () => { if (isSearchOpen && searchQuery.trim() === "") setIsSearchOpen(false); }); + // derived values + const activeLayout = currentProjectDisplayFilters?.layout ?? "list"; const handleFilters = useCallback( (key: keyof TCycleFilters, value: string | string[]) => { @@ -140,9 +142,7 @@ export const CyclesViewHeader: React.FC = observer((props) => { diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx index fa9008d2f..651d03898 100644 --- a/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx +++ b/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx @@ -47,7 +47,7 @@ const ProjectCyclesPage: NextPageWithLayout = observer(() => { const pageTitle = project?.name ? `${project?.name} - Cycles` : undefined; // selected display filters const cycleTab = currentProjectDisplayFilters?.active_tab; - const cycleLayout = currentProjectDisplayFilters?.layout; + const cycleLayout = currentProjectDisplayFilters?.layout ?? "list"; const handleRemoveFilter = (key: keyof TCycleFilters, value: string | null) => { if (!projectId) return; @@ -120,14 +120,12 @@ const ProjectCyclesPage: NextPageWithLayout = observer(() => { - {cycleTab && cycleLayout && ( - - )} +