diff --git a/src/renderer/features/albums/routes/album-detail-route.tsx b/src/renderer/features/albums/routes/album-detail-route.tsx index 5260eb7cd..051b45e4c 100644 --- a/src/renderer/features/albums/routes/album-detail-route.tsx +++ b/src/renderer/features/albums/routes/album-detail-route.tsx @@ -17,9 +17,10 @@ import { LibraryHeaderBar } from '/@/renderer/features/shared/components/library import { PageErrorBoundary } from '/@/renderer/features/shared/components/page-error-boundary'; import { useFastAverageColor } from '/@/renderer/hooks'; import { useAlbumBackground, useCurrentServer } from '/@/renderer/store'; -import { Spinner } from '/@/shared/components/spinner/spinner'; import { LibraryItem } from '/@/shared/types/domain-types'; +const ALBUM_DETAIL_BG_FALLBACK = 'var(--theme-colors-foreground-muted)'; + const AlbumDetailRoute = () => { const scrollAreaRef = useRef(null); const headerRef = useRef(null); @@ -42,25 +43,21 @@ const AlbumDetailRoute = () => { type: 'itemCard', }) || ''; - const { background: backgroundColor, isLoading: isColorLoading } = useFastAverageColor({ + const { background: backgroundColor } = useFastAverageColor({ id: albumId, src: imageUrl, srcLoaded: true, }); - const background = backgroundColor; + const background = backgroundColor ?? ALBUM_DETAIL_BG_FALLBACK; const showBlurredImage = albumBackground; - if (isColorLoading) { - return ; - } - return ( { ); - return }>{router}; + return }>{router}; };