From e948b00f55fbd787a9458c98d768664a5c61dd90 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Sat, 6 Jun 2026 09:51:23 +0330 Subject: [PATCH] remove proxy --- .cursor/rules/persian-language.mdc | 10 ++++ .../(Main)/components/CategoryScroll.tsx | 47 +++++++------------ 2 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 .cursor/rules/persian-language.mdc diff --git a/.cursor/rules/persian-language.mdc b/.cursor/rules/persian-language.mdc new file mode 100644 index 0000000..1f26944 --- /dev/null +++ b/.cursor/rules/persian-language.mdc @@ -0,0 +1,10 @@ +--- +description: پاسخ‌های Agent همیشه به فارسی باشد +alwaysApply: true +--- + +# زبان پاسخ + +- همیشه به **فارسی (Farsi)** پاسخ بده. +- مگر اینکه کاربر صریحاً زبان دیگری بخواهد. +- کد، نام متغیرها، و کامنت‌های کد را به انگلیسی نگه دار؛ فقط توضیحات و متن‌های کاربرپسند را فارسی بنویس. diff --git a/src/app/[name]/(Main)/components/CategoryScroll.tsx b/src/app/[name]/(Main)/components/CategoryScroll.tsx index 8a6c45a..bee80b3 100644 --- a/src/app/[name]/(Main)/components/CategoryScroll.tsx +++ b/src/app/[name]/(Main)/components/CategoryScroll.tsx @@ -20,43 +20,30 @@ function CategoryImage({ src, size, alt, - proxyBase, + // proxyBase, }: { src: string; size: number; alt: string; - proxyBase: string | null; + // proxyBase: string | null; }) { const isSvg = src.endsWith(".svg"); if (isSvg) { - const isSameOrigin = - src.startsWith("/") || - (typeof window !== "undefined" && - new URL(src, window.location.href).origin === window.location.origin); - - const maskUrl = isSameOrigin - ? src - : proxyBase - ? `${proxyBase}/api/proxy-svg?url=${encodeURIComponent(src)}` - : null; - - if (maskUrl) { - return ( -
- ); - } + return ( +
+ ); return ( // eslint-disable-next-line @next/next/no-img-element @@ -160,7 +147,7 @@ const CategoryScroll = ({ src={item.avatarUrl || "/assets/images/food-image.png"} size={imageSize} alt="category image" - proxyBase={proxyBase} + // proxyBase={proxyBase} /> {item.title}