From 95d79518e7d1479b88b7e39ebc79b0c0443200fc Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Tue, 18 Aug 2026 13:56:21 +0330 Subject: [PATCH] fix(lint): resolve typescript and eslint warnings in products, reviews, videos and update graphify --- frontend/admin-panel/src/pages/Products.tsx | 25 +- .../application/components/ProductPage.tsx | 1 - .../application/components/ProductReviews.tsx | 4 +- .../application/components/VideosPage.tsx | 4 +- .../lib/services/productService.ts | 2 +- graphify-out/.graphify_labels.json | 55 +- graphify-out/.graphify_labels.json.sig | 2 +- graphify-out/.graphify_root | 2 +- graphify-out/2026-08-18/.graphify_labels.json | 111 +- graphify-out/2026-08-18/GRAPH_REPORT.md | 466 +- graphify-out/2026-08-18/graph.json | 88957 ++++++++-------- graphify-out/2026-08-18/manifest.json | 1096 +- graphify-out/GRAPH_REPORT.md | 313 +- graphify-out/cache/stat-index.json | 2 +- graphify-out/graph.html | 8 +- graphify-out/graph.json | 9402 +- graphify-out/manifest.json | 1132 +- 17 files changed, 51855 insertions(+), 49727 deletions(-) diff --git a/frontend/admin-panel/src/pages/Products.tsx b/frontend/admin-panel/src/pages/Products.tsx index 00fa3d1..1fc31f2 100644 --- a/frontend/admin-panel/src/pages/Products.tsx +++ b/frontend/admin-panel/src/pages/Products.tsx @@ -398,10 +398,11 @@ export default function Products() { setIsModalOpen(false); setImageErrors({}); await fetchData(); - } catch (error: any) { + } catch (error: unknown) { console.error('Save failed', error); - const serverMsg = error.response?.data?.message || error.message; - if (serverMsg && !error._toastShown) { + const axiosErr = error as { response?: { data?: { message?: string } }; message?: string; _toastShown?: boolean }; + const serverMsg = axiosErr.response?.data?.message || axiosErr.message; + if (serverMsg && !axiosErr._toastShown) { toast.error(`خطا در ذخیره محصول: ${serverMsg}`); } } @@ -1297,12 +1298,16 @@ export default function Products() { /> {formData.imageUrl && (
- Cover setMediaImageError(true)} - /> + {mediaImageError ? ( + + ) : ( + Cover setMediaImageError(true)} + /> + )}
)} @@ -1321,7 +1326,7 @@ export default function Products() {