diff --git a/src/app/memories/page.tsx b/src/app/memories/page.tsx index 33df0ba..f2ca134 100644 --- a/src/app/memories/page.tsx +++ b/src/app/memories/page.tsx @@ -190,9 +190,10 @@ export default function MemoriesPage() { }; const baseList = searchResults !== null ? searchResults : memories; - const displayMemories = activeFolder + const displayMemories = (activeFolder ? baseList.filter(m => m.description === activeFolder) - : baseList; + : baseList + ).filter(m => m.url || m.thumbnailUrl); const folderCounts = memories.reduce>((acc, m) => { if (m.description) acc[m.description] = (acc[m.description] || 0) + 1; @@ -269,9 +270,14 @@ export default function MemoriesPage() {

) : ( -
+
{displayMemories.map(mem => ( - setSelected(mem)} /> + f.id === mem.description) ?? null} + onClick={() => setSelected(mem)} + /> ))}
)} @@ -389,26 +395,48 @@ export default function MemoriesPage() { // ─── Grid tile ──────────────────────────────────────────────────────────────── -function MemoryTile({ memory, onClick }: { memory: Memory; onClick: () => void }) { - const [loaded, setLoaded] = useState(false); +function MemoryTile({ memory, folder, onClick }: { memory: Memory; folder: Folder | null; onClick: () => void }) { + const [loaded, setLoaded] = useState(false); + const [imgError, setImgError] = useState(false); const src = memory.thumbnailUrl || memory.url; + + if (imgError) return null; + return ( - + {/* Folder label */} + {folder && folder.id && ( +

+ {folder.emoji} {folder.label} +

)} - {memory.isPrivate &&
🔒
} - +
); }