Fix local photos showing wrong provider label in gallery (#625)

- Guard provider badge with truthy check to handle null/undefined provider
- Use explicit provider name matching instead of binary immich/synology fallback
This commit is contained in:
Maurice
2026-04-14 20:30:16 +02:00
parent e695e0f62d
commit 81d3d6cc7d
+2 -2
View File
@@ -928,11 +928,11 @@ function GalleryView({ entries, journeyId, userId, trips, onPhotoClick, onRefres
>
<X size={12} />
</button>
{photo.provider !== 'local' && (
{photo.provider && photo.provider !== 'local' && (
<div className="absolute top-1.5 left-1.5">
<span className="text-[8px] font-medium px-1.5 py-0.5 rounded-full bg-black/70 backdrop-blur text-white flex items-center gap-1">
<RefreshCw size={7} />
{photo.provider === 'immich' ? 'Immich' : 'Synology'}
{photo.provider === 'immich' ? 'Immich' : photo.provider === 'synology' ? 'Synology' : photo.provider}
</span>
</div>
)}