chore: cycle status logic updated

This commit is contained in:
Anmol Singh Bhatia 2023-12-28 13:01:11 +05:30
parent ff8008cbed
commit d19e2102a9

View File

@ -51,6 +51,8 @@ export const CyclesListItem: FC<TCyclesListItem> = (props) => {
const [deleteModal, setDeleteModal] = useState(false);
// computed
const cycleStatus = getDateRangeStatus(cycle.start_date, cycle.end_date);
console.log("status", getDateRangeStatus("2023-12-29", "2023-12-30"));
const isCompleted = cycleStatus === "completed";
const endDate = new Date(cycle.end_date ?? "");
const startDate = new Date(cycle.start_date ?? "");