Fix ref issue

This commit is contained in:
jeffvli 2023-06-09 00:09:46 -07:00 committed by Jeff
parent 14a6766072
commit 01608fa875
3 changed files with 51 additions and 59 deletions

View file

@ -152,7 +152,7 @@ export const FullScreenPlayerImage = () => {
<ImageContainer>
<AnimatePresence
initial={false}
mode="popLayout"
mode="sync"
>
{imageState.current === 0 && (
<ImageWithPlaceholder
@ -168,11 +168,7 @@ export const FullScreenPlayerImage = () => {
variants={imageVariants}
/>
)}
</AnimatePresence>
<AnimatePresence
initial={false}
mode="popLayout"
>
{imageState.current === 1 && (
<ImageWithPlaceholder
key={imageKey}

View file

@ -69,7 +69,6 @@ const Controls = () => {
useHotkeys([['Escape', handleToggleFullScreenPlayer]]);
return (
<>
<Group
p="1rem"
pos="absolute"
@ -117,7 +116,6 @@ const Controls = () => {
</Popover.Dropdown>
</Popover>
</Group>
</>
);
};

View file

@ -6,10 +6,8 @@ export const FullScreenOverlay = () => {
const { expanded: isFullScreenPlayerExpanded } = useFullScreenPlayerStore();
return (
<>
<AnimatePresence initial={false}>
{isFullScreenPlayerExpanded && <FullScreenPlayer />}
</AnimatePresence>
</>
);
};