import React, { useState } from "react"; import Link from "next/link"; import { useRouter } from "next/router"; // components import { DeleteModuleModal } from "components/modules"; // ui import { AssigneesList, Avatar } from "components/ui"; // icons import { CalendarDaysIcon, TrashIcon } from "@heroicons/react/24/outline"; // helpers import { renderShortNumericDateFormat } from "helpers/date-time.helper"; // types import { IModule } from "types"; // common import { MODULE_STATUS } from "constants/module"; type Props = { module: IModule; }; export const SingleModuleCard: React.FC = ({ module }) => { const [moduleDeleteModal, setModuleDeleteModal] = useState(false); const router = useRouter(); const { workspaceSlug } = router.query; const handleDeleteModule = () => { if (!module) return; setModuleDeleteModal(true); }; return ( <>
{module.name}
LEAD
MEMBERS
END DATE
{renderShortNumericDateFormat(module.target_date ?? "")}
STATUS
s.value === module.status)?.color, }} /> {module.status}
); };