mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 20:40:21 +02:00
Prevent wrong initial color on navigation on the same route
This commit is contained in:
@@ -122,7 +122,11 @@ export const FullScreenPlayerImage = () => {
|
||||
const { queue } = usePlayerData();
|
||||
const useImageAspectRatio = useFullScreenPlayerStore((state) => state.useImageAspectRatio);
|
||||
const currentSong = queue.current;
|
||||
const background = useFastAverageColor(queue.current?.imageUrl, true, 'dominant');
|
||||
const { color: background } = useFastAverageColor({
|
||||
algorithm: 'dominant',
|
||||
src: queue.current?.imageUrl,
|
||||
srcLoaded: true,
|
||||
});
|
||||
const imageKey = `image-${background}`;
|
||||
|
||||
const [imageState, setImageState] = useSetState({
|
||||
|
||||
@@ -193,7 +193,11 @@ export const FullScreenPlayer = () => {
|
||||
}, [location, setStore]);
|
||||
|
||||
const currentSong = useCurrentSong();
|
||||
const background = useFastAverageColor(currentSong?.imageUrl, true, 'dominant');
|
||||
const { color: background } = useFastAverageColor({
|
||||
algorithm: 'dominant',
|
||||
src: currentSong?.imageUrl,
|
||||
srcLoaded: true,
|
||||
});
|
||||
|
||||
return (
|
||||
<Container
|
||||
|
||||
Reference in New Issue
Block a user