fix(images): resolve relative backend image URLs to absolute
API مسیرهای تصویر را نسبی برمیگرداند (/uploads/...) که next/image روی دامنه localhost میجست و 404 میداد. helper جدید imageUrl مسیرهای نسبی uploads را با NEXT_PUBLIC_API_URL کامل میکند (absolute و asset محلی دستنخورده). اعمال روی لیست/جزئیات پزشک، نوبت، گالری کلینیک، آواتارها. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import GreenCalendarTurn from "@/components/icons/GreenCalendarTurn";
|
||||
import { Button } from "@mui/material";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { imageUrl } from "@/helper";
|
||||
|
||||
function ItemAppointment({ turn, loading, doctorSlug }) {
|
||||
return (
|
||||
@@ -21,7 +22,7 @@ function ItemAppointment({ turn, loading, doctorSlug }) {
|
||||
width={56}
|
||||
height={56}
|
||||
alt="doctor"
|
||||
src={turn?.img[0]?.url}
|
||||
src={imageUrl(turn?.img?.[0]?.url)}
|
||||
/>
|
||||
</CircularLoading>
|
||||
<div className="flex flex-col items-start justify-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user