This commit is contained in:
30
src/LandingAnimation/index.tsx
Normal file
30
src/LandingAnimation/index.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { FC, useEffect, useState } from "react";
|
||||
import { AnimatePresence, motion, TargetAndTransition } from 'framer-motion'
|
||||
|
||||
import style from './style.module.scss'
|
||||
import Suika from '../Assets/favicon.webp'
|
||||
|
||||
export const LandingAnimation: FC = () => {
|
||||
const [isVisible, setVisible] = useState(true)
|
||||
const exitAnimation: TargetAndTransition = {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setVisible(false)
|
||||
}, 1000)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
{isVisible && (
|
||||
<motion.div exit={exitAnimation} className={style.container}>
|
||||
<img src={Suika} alt="suika" />
|
||||
<h1>The PTOOLS</h1>
|
||||
<p>Right tools for you!</p>
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
)
|
||||
}
|
20
src/LandingAnimation/style.module.scss
Normal file
20
src/LandingAnimation/style.module.scss
Normal file
@@ -0,0 +1,20 @@
|
||||
.container {
|
||||
position: absolute;
|
||||
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
|
||||
width: 100dvw;
|
||||
height: 100dvh;
|
||||
|
||||
img {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user