refactor(dateTime): streamline slot handling and improve session management
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { Button } from "@mui/material";
|
||||
import React from "react";
|
||||
|
||||
function List({ appo, hour, setHour, value }) {
|
||||
const list = appo && appo[value ? "evening" : "morning"];
|
||||
function List({ slots, hour, setHour }) {
|
||||
const list = slots;
|
||||
const checkHour = (item) => JSON.stringify(item) === JSON.stringify(hour);
|
||||
const isSelectable = (item) =>
|
||||
item.is_available && !(item?.start && item.start * 1000 < Date.now());
|
||||
@@ -30,8 +30,7 @@ function List({ appo, hour, setHour, value }) {
|
||||
} else {
|
||||
return (
|
||||
<p className="text-[#525252] text-[14px] md:text-[16px] font-medium py-[56px]">
|
||||
در حال حاضر، نوبتی برای ساعتهای {[value ? "بعد از ظهر" : "صبح"]} موجود
|
||||
نمیباشد.
|
||||
در حال حاضر، نوبتی برای این شیفت موجود نمیباشد.
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user