Move fadein directly to component

This commit is contained in:
jeffvli
2022-11-05 12:00:46 -07:00
parent 385ec5f856
commit 07123615ca
4 changed files with 23 additions and 7 deletions
@@ -32,11 +32,13 @@ const MetadataStack = styled(motion.div)`
`;
const Image = styled(motion(Link))`
${fadeIn};
width: 70px;
height: 70px;
filter: drop-shadow(0 0 5px rgb(0, 0, 0, 100%));
${fadeIn};
animation: fadein 0.2s ease-in-out;
button {
display: none;
}
@@ -91,7 +93,7 @@ export const LeftControls = () => {
transition={{ duration: 0.3, ease: 'easeInOut' }}
>
{song?.imageUrl ? (
<PlayerbarImage src={song?.imageUrl} />
<PlayerbarImage loading="eager" src={song?.imageUrl} />
) : (
<>
<Center
@@ -30,10 +30,12 @@ const SidebarContainer = styled.div`
`;
const ImageContainer = styled(motion(Link))<{ height: string }>`
${fadeIn};
position: relative;
height: ${(props) => props.height};
${fadeIn};
animation: fadein 0.2s ease-in-out;
button {
display: none;
}
@@ -188,7 +190,7 @@ export const Sidebar = () => {
transition={{ duration: 0.3, ease: 'easeInOut' }}
>
{imageUrl ? (
<SidebarImage src={imageUrl} />
<SidebarImage loading="eager" src={imageUrl} />
) : (
<Center
sx={{ background: 'var(--placeholder-bg)', height: '100%' }}