diff --git a/app-9xzmfic2e4g1/src/components/trip/Timeline.tsx b/app-9xzmfic2e4g1/src/components/trip/Timeline.tsx index 5e25e0f..137e187 100644 --- a/app-9xzmfic2e4g1/src/components/trip/Timeline.tsx +++ b/app-9xzmfic2e4g1/src/components/trip/Timeline.tsx @@ -305,11 +305,24 @@ function SortableItem({ }; const photoUrl = useMemo(() => { - if (!item.photo_reference) return null; - return item.photo_reference.startsWith('http') - ? item.photo_reference - : api.getPhotoUrl(item.photo_reference); - }, [item.photo_reference]); + if (item.photo_reference) { + return item.photo_reference.startsWith('http') + ? item.photo_reference + : api.getPhotoUrl(item.photo_reference); + } + // Kategori bazlı Kapadokya fallback resimleri + const fallbacks: Record = { + museum: 'https://images.unsplash.com/photo-1599930113854-d6d7fd521f10?w=400&q=80', + nature: 'https://images.unsplash.com/photo-1570168007204-dfb528c6958f?w=400&q=80', + history: 'https://images.unsplash.com/photo-1524231757912-21f4fe3a7200?w=400&q=80', + landmark: 'https://images.unsplash.com/photo-1541167760496-1628856ab772?w=400&q=80', + gastronomy: 'https://images.unsplash.com/photo-1512152272829-e3139592d56f?w=400&q=80', + culture: 'https://images.unsplash.com/photo-1599930113854-d6d7fd521f10?w=400&q=80', + activity: 'https://images.unsplash.com/photo-1570168007204-dfb528c6958f?w=400&q=80', + wellness: 'https://images.unsplash.com/photo-1544833316-64d88e00182a?w=400&q=80', + }; + return fallbacks[item.category] ?? 'https://images.unsplash.com/photo-1541167760496-1628856ab772?w=400&q=80'; + }, [item.photo_reference, item.category]); const endTime = calcEndTime(item); @@ -361,24 +374,24 @@ function SortableItem({ - {/* Küçük thumbnail */} - {photoUrl && !imgError && ( -
- {!imgLoaded && ( -
+ {/* Küçük thumbnail — her zaman göster */} +
+ {!imgLoaded && ( +
+ )} + {item.name} setImgLoaded(true)} + onError={() => { setImgError(true); setImgLoaded(true); }} + className={cn( + "w-full h-full object-cover transition-opacity duration-300", + imgLoaded ? "opacity-100" : "opacity-0" )} - {item.name} setImgLoaded(true)} - onError={() => setImgError(true)} - className={cn( - "w-full h-full object-cover transition-opacity duration-300", - imgLoaded ? "opacity-100" : "opacity-0" - )} - /> -
- )} + /> +
{/* Aksiyonlar (hover'da görünür) */}