fix: correct translate in movement
This commit is contained in:
@@ -8,7 +8,11 @@ export default function Dashboard() {
|
|||||||
const [isLoaded, setIsLoaded] = useState(false);
|
const [isLoaded, setIsLoaded] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
setIsLoaded(true);
|
setIsLoaded(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -19,9 +23,7 @@ export default function Dashboard() {
|
|||||||
>
|
>
|
||||||
<div className="mt-10 md:mt-37.5 text-2xl md:text-6xl font-bold text-white flex flex-col">
|
<div className="mt-10 md:mt-37.5 text-2xl md:text-6xl font-bold text-white flex flex-col">
|
||||||
<div
|
<div
|
||||||
className={`transition-all duration-1000 ease-out ${isLoaded
|
className={`transition-all duration-1000 ease-out ${isLoaded ? "translate-x-0" : "-translate-x-[100vw]"
|
||||||
? "translate-x-0 opacity-100"
|
|
||||||
: "-transition-x-full opacity-0"
|
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
Свежие морепродукты <br />
|
Свежие морепродукты <br />
|
||||||
|
|||||||
Reference in New Issue
Block a user