mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-06 20:10:12 +02:00
add spinner for color loading fallback
This commit is contained in:
@@ -17,6 +17,7 @@ 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 AlbumDetailRoute = () => {
|
||||
@@ -44,7 +45,7 @@ const AlbumDetailRoute = () => {
|
||||
const { background: backgroundColor, isLoading: isColorLoading } = useFastAverageColor({
|
||||
id: albumId,
|
||||
src: imageUrl,
|
||||
srcLoaded: !detailQuery.isLoading,
|
||||
srcLoaded: true,
|
||||
});
|
||||
|
||||
const background = backgroundColor;
|
||||
@@ -52,7 +53,7 @@ const AlbumDetailRoute = () => {
|
||||
const showBlurredImage = albumBackground;
|
||||
|
||||
if (isColorLoading) {
|
||||
return null;
|
||||
return <Spinner container />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user