fix(flash): fetch flash items with artist.id after artist loads to avoid slug/id mismatch

This commit is contained in:
Nicholai 2025-10-20 18:57:34 -06:00
parent 41eca45e07
commit fa2859dd52

View File

@ -30,7 +30,7 @@ export function ArtistPortfolio({ artistId }: ArtistPortfolioProps) {
// Fetch artist data from API
const { data: artist, isLoading, error } = useArtist(artistId)
const { data: flashItems = [] } = useFlash(artistId)
const { data: flashItems = [] } = useFlash(artist?.id)
// keep a reference to the last focused thumbnail so we can return focus on modal close
const lastFocusedRef = useRef<HTMLElement | null>(null)