fix: correct translate in movement
This commit is contained in:
@@ -8,7 +8,11 @@ export default function Dashboard() {
|
||||
const [isLoaded, setIsLoaded] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
setIsLoaded(true);
|
||||
});
|
||||
});
|
||||
}, []);
|
||||
|
||||
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={`transition-all duration-1000 ease-out ${isLoaded
|
||||
? "translate-x-0 opacity-100"
|
||||
: "-transition-x-full opacity-0"
|
||||
className={`transition-all duration-1000 ease-out ${isLoaded ? "translate-x-0" : "-translate-x-[100vw]"
|
||||
}`}
|
||||
>
|
||||
Свежие морепродукты <br />
|
||||
|
||||
Reference in New Issue
Block a user