From 21475ff08eaee9450e86f9aefdd8c3d950357cdb Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Date: Wed, 11 Jun 2025 09:11:30 +0330 Subject: [PATCH] Use remote_url as fallback when media preview fails to load --- src/components/AdminDashboard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AdminDashboard.tsx b/src/components/AdminDashboard.tsx index 3572f32..81f495d 100644 --- a/src/components/AdminDashboard.tsx +++ b/src/components/AdminDashboard.tsx @@ -205,9 +205,9 @@ const AdminDashboard = ({ token, onLogout }: AdminDashboardProps) => { alt="Media to review" className="max-w-full max-h-96 rounded-lg shadow-md object-contain" onError={(e) => { - // Fallback to main URL if preview fails + // Fallback to remote URL if preview fails const target = e.target as HTMLImageElement; - target.src = currentMedia.url; + target.src = currentMedia.remote_url; }} />