Prevent layout shift on page load (#2268)
- prevent layout shift on page load
This commit is contained in:
@ -50,6 +50,7 @@ const NavCollapseButton = ({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StyledCollapseButton
|
<StyledCollapseButton
|
||||||
|
initial={{ opacity: show ? 1 : 0 }}
|
||||||
animate={{
|
animate={{
|
||||||
opacity: show ? 1 : 0,
|
opacity: show ? 1 : 0,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -48,6 +48,7 @@ export const NavbarAnimatedContainer = ({
|
|||||||
onAnimationComplete={() => {
|
onAnimationComplete={() => {
|
||||||
setIsNavbarSwitchingSize(false);
|
setIsNavbarSwitchingSize(false);
|
||||||
}}
|
}}
|
||||||
|
initial={{ width: isNavbarOpened ? leftBarWidth : '0' }}
|
||||||
animate={{
|
animate={{
|
||||||
width: isNavbarOpened ? leftBarWidth : '0',
|
width: isNavbarOpened ? leftBarWidth : '0',
|
||||||
opacity: isNavbarOpened ? 1 : 0,
|
opacity: isNavbarOpened ? 1 : 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user