From 5d7dfa33e2734d7b1629d46ec7bdb7ce05efb729 Mon Sep 17 00:00:00 2001 From: Nicholai Date: Mon, 20 Oct 2025 20:39:25 -0600 Subject: [PATCH] fix(artists): exclude profile and non-public images from Featured Work/gallery filters --- components/artist-portfolio.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/artist-portfolio.tsx b/components/artist-portfolio.tsx index 9d5cb2044..c1288c2df 100644 --- a/components/artist-portfolio.tsx +++ b/components/artist-portfolio.tsx @@ -113,14 +113,16 @@ export function ArtistPortfolio({ artistId }: ArtistPortfolioProps) { // Derived lists (safe when `artist` is undefined during initial renders) const portfolioImages = artist?.portfolioImages || [] + // Exclude profile/non-public images from the displayed gallery + const galleryImages = portfolioImages.filter((img) => img.isPublic !== false && !img.tags.includes('profile')) - // Get unique categories from tags - const allTags = portfolioImages.flatMap(img => img.tags) + // Get unique categories from tags (use gallery images only) + const allTags = galleryImages.flatMap(img => img.tags) const categories = ["All", ...Array.from(new Set(allTags))] const filteredPortfolio = selectedCategory === "All" - ? portfolioImages - : portfolioImages.filter(img => img.tags.includes(selectedCategory)) + ? galleryImages + : galleryImages.filter(img => img.tags.includes(selectedCategory)) // keyboard navigation for modal (kept as hooks so they run in same order every render) const goToIndex = useCallback( @@ -516,8 +518,8 @@ export function ArtistPortfolio({ artistId }: ArtistPortfolioProps) { ))} {/* Minimal nav controls */} - - + + {/* Edge fade gradients (desktop) */}