import { FC } from "react"; import { observer } from "mobx-react-lite"; import { useTheme } from "next-themes"; // hooks // components import { CyclePeekOverview, CyclesBoardCard } from "components/cycles"; import { EmptyState, getEmptyStateImagePath } from "components/empty-state"; // constants import { CYCLE_EMPTY_STATE_DETAILS } from "constants/empty-state"; import { useUser } from "hooks/store"; export interface ICyclesBoard { cycleIds: string[]; filter: string; workspaceSlug: string; projectId: string; peekCycle: string | undefined; } export const CyclesBoard: FC = observer((props) => { const { cycleIds, filter, workspaceSlug, projectId, peekCycle } = props; // theme const { resolvedTheme } = useTheme(); // store hooks const { currentUser } = useUser(); const emptyStateDetail = CYCLE_EMPTY_STATE_DETAILS[filter as keyof typeof CYCLE_EMPTY_STATE_DETAILS]; const isLightMode = resolvedTheme ? resolvedTheme === "light" : currentUser?.theme.theme === "light"; const emptyStateImage = getEmptyStateImagePath("cycle", filter, isLightMode); return ( <> {cycleIds?.length > 0 ? (
{cycleIds.map((cycleId) => ( ))}
) : ( )} ); });