import { useRouter } from "next/router";
// ui
import { Tooltip, ContrastIcon } from "@plane/ui";
// helpers
import { 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 = data.status.toLocaleLowerCase();
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 = data.status.toLocaleLowerCase();
return (
router.push(`/${workspaceSlug}/projects/${data?.project}/cycles/${data?.id}`)}
>
{data?.name}
);
};