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:
@@ -1,5 +1,6 @@
|
||||
import CustomLoading from "@/app/component/loading/Custom";
|
||||
import Image from "next/image";
|
||||
import { imageUrl } from "@/helper";
|
||||
|
||||
function Slider({ data }) {
|
||||
return (
|
||||
@@ -11,7 +12,7 @@ function Slider({ data }) {
|
||||
idx !== 0 ? (
|
||||
<CustomLoading key={idx} width={90} height={90}>
|
||||
<Image
|
||||
src={item.url}
|
||||
src={imageUrl(item.url)}
|
||||
width={90}
|
||||
height={90}
|
||||
alt="image clinic"
|
||||
|
||||
Reference in New Issue
Block a user