Use remote_url as fallback when media preview fails to load
This commit is contained in:
@@ -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;
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user