import { useRouter } from "next/router"; // ui import { Tooltip } from "components/ui"; // icons import { ContrastIcon } from "components/icons"; // helpers import { getDateRangeStatus, renderShortDate } from "helpers/date-time.helper"; // types import { ICycle } from "types"; export const CycleGanttBlock = ({ data }: { data: ICycle }) => { const router = useRouter(); const { workspaceSlug } = router.query; const cycleStatus = getDateRangeStatus(data?.start_date, data?.end_date); return (
router.push(`/${workspaceSlug}/projects/${data?.project}/cycles/${data?.id}`)} >
{data?.name}
{renderShortDate(data?.start_date ?? "")} to {renderShortDate(data?.end_date ?? "")}
} position="top-left" >
{data?.name}
); }; export const CycleGanttSidebarBlock = ({ data }: { data: ICycle }) => { const router = useRouter(); const { workspaceSlug } = router.query; const cycleStatus = getDateRangeStatus(data?.start_date, data?.end_date); return (
router.push(`/${workspaceSlug}/projects/${data?.project}/cycles/${data?.id}`)} >
{data?.name}
); };