Use remote_url as fallback when media preview fails to load

This commit is contained in:
2025-06-11 09:11:30 +03:30
parent f6a0040a94
commit 21475ff08e

View File

@@ -205,9 +205,9 @@ const AdminDashboard = ({ token, onLogout }: AdminDashboardProps) => {
alt="Media to review" alt="Media to review"
className="max-w-full max-h-96 rounded-lg shadow-md object-contain" className="max-w-full max-h-96 rounded-lg shadow-md object-contain"
onError={(e) => { onError={(e) => {
// Fallback to main URL if preview fails // Fallback to remote URL if preview fails
const target = e.target as HTMLImageElement; const target = e.target as HTMLImageElement;
target.src = currentMedia.url; target.src = currentMedia.remote_url;
}} }}
/> />
</div> </div>