fix(dashboard): appointment detail fields + sidebar hydration
- Appointment detail (DetailLg/DetailSm) read the real response shape: date/time from slot_start, specialty from doctor.specialties[0].name, phone from address.telephone. - Sidebar Head reads userInfo (cookie) after mount to avoid an SSR/client hydration mismatch on the user's name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,7 @@ function DetailLg({ appointmentData, loading }) {
|
||||
</TextLoading>
|
||||
<TextLoading loading={loading} width={80} height={18}>
|
||||
<p className="text-[#616161] text-[14px] md:text-[15px] lg:text-[16px] font-medium">
|
||||
تخصص: {appointmentData?.doctor?.specialty?.name}
|
||||
تخصص: {appointmentData?.doctor?.specialties?.[0]?.name}
|
||||
</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
@@ -73,7 +73,7 @@ function DetailLg({ appointmentData, loading }) {
|
||||
<p className="text-[#616161] text-[14px] lg:text-[20px] font-medium">
|
||||
تاریخ نوبت:{" "}
|
||||
<span className="text-[#2F2F2F] text-[14px] lg:text-[20px] font-bold">
|
||||
{convertTimestampToJalali(appointmentData?.start_time)}
|
||||
{convertTimestampToJalali(appointmentData?.slot_start)}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
@@ -84,7 +84,7 @@ function DetailLg({ appointmentData, loading }) {
|
||||
<p className="text-[#616161] text-[14px] lg:text-[20px] font-medium">
|
||||
زمان نوبت:{" "}
|
||||
<span className="text-[#2F2F2F] text-[14px] lg:text-[20px] font-bold">
|
||||
ساعت {appointmentData?.slot?.time}
|
||||
ساعت {convertTimestampToTime(appointmentData?.slot_start)}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
@@ -126,7 +126,7 @@ function DetailLg({ appointmentData, loading }) {
|
||||
<p className="text-[#616161] text-[14px] lg:text-[16px] font-normal">
|
||||
تلفن:{" "}
|
||||
<span className="text-[#2F2F2F] text-[14px] lg:text-[16px] font-normal">
|
||||
{appointmentData?.address?.phone}
|
||||
{appointmentData?.address?.telephone}
|
||||
</span>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user