import { useRouter } from "next/router";
// ui
import { Tooltip, ContrastIcon } from "@plane/ui";
// helpers
import { renderFormattedDate } from "helpers/date-time.helper";
// types
import { ICycle } from "@plane/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}
{renderFormattedDate(data?.start_date ?? "")} to {renderFormattedDate(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}
);
};