diff --git a/components/doctor/detailDoctor/cards/locations/Item.js b/components/doctor/detailDoctor/cards/locations/Item.js index 9433b68..b308979 100644 --- a/components/doctor/detailDoctor/cards/locations/Item.js +++ b/components/doctor/detailDoctor/cards/locations/Item.js @@ -11,8 +11,8 @@ import RoutingC from "@/components/icons/RoutingC"; // Leaflet به window نیاز دارد → فقط کلاینت const MapView = dynamic(() => import("@/components/common/MapView"), { ssr: false }); -function Item({ data, bookable = true }) { - const [isOpen, setIsOpen] = useState(false); +function Item({ data, bookable = true, defaultOpen = false }) { + const [isOpen, setIsOpen] = useState(defaultOpen); const [open, setOpen] = useState(false); const handleOpen = () => setOpen(true); diff --git a/components/doctor/detailDoctor/cards/locations/index.js b/components/doctor/detailDoctor/cards/locations/index.js index 950ad22..d5141c5 100644 --- a/components/doctor/detailDoctor/cards/locations/index.js +++ b/components/doctor/detailDoctor/cards/locations/index.js @@ -14,7 +14,13 @@ function Locations({ addresses, bookableAddressUuids = [] }) { {addresses.map((item, idx) => (
  • - + {/* اولین محل از ابتدا باز است: بازدیدکننده معمولاً یک آدرس بیشتر + نمی‌خواهد و بستنِ همه یعنی یک کلیک اضافه برای همان یک آدرس. */} + {addresses.length > idx + 1 && ( )}