This commit is contained in:
2024-06-10 19:35:27 +05:00
parent 4a75925f86
commit 3a36d185a3
3 changed files with 14 additions and 6 deletions
+9 -1
View File
@@ -5,7 +5,12 @@ import { Trans } from "react-i18next";
import useSidebarTabStore from "../stores/useSidebarStore";
import TimeSelector from "./TimeSelector";
import CloseIcon from "./icons/CloseIcon";
import { eachMinuteOfInterval, format, isAfter, parse } from "date-fns";
import {
eachMinuteOfInterval,
format,
isAfter,
parse,
} from "date-fns";
import i18n from "../i18n";
import { enUS, ru } from "date-fns/locale";
import ky from "ky";
@@ -84,6 +89,9 @@ function SidebarTab2() {
if (!selectedDay || !build || !scheduledSessions || !schedule) return;
const step = schedule.sessionDuration + schedule.sessionBreak;
console.log("selectedDay", selectedDay);
const times = eachMinuteOfInterval(
{
start: parse(schedule.startTime, "HH:mm", selectedDay),