feat(doctor): open the first location on load
Every address started collapsed, so a doctor with one office made the visitor click before seeing where that office is — the thing they came to the section for. The first entry now renders expanded; the rest stay closed so a long list does not push the page down. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,13 @@ function Locations({ addresses, bookableAddressUuids = [] }) {
|
||||
{addresses.map((item, idx) => (
|
||||
<CustomLoading key={idx} width="full" height={40}>
|
||||
<li className="w-full">
|
||||
<Item data={item} bookable={bookable.has(item.uuid)} />
|
||||
{/* اولین محل از ابتدا باز است: بازدیدکننده معمولاً یک آدرس بیشتر
|
||||
نمیخواهد و بستنِ همه یعنی یک کلیک اضافه برای همان یک آدرس. */}
|
||||
<Item
|
||||
data={item}
|
||||
bookable={bookable.has(item.uuid)}
|
||||
defaultOpen={idx === 0}
|
||||
/>
|
||||
{addresses.length > idx + 1 && (
|
||||
<span className="w-full h-px bg-[#EFEFEF] block my-[12px] md:my-[14px] lg:my-[16px]"></span>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user