-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
๐ง Fix : ์๋ธ๋ ์น ์์ฑํ์ฌ ์ถฉ๋ ์์ (#20)
- Loading branch information
Showing
3 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.splash-container { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background-color: white; | ||
} | ||
|
||
.logo { | ||
height: auto; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.subtitle { | ||
font-size: 16px; | ||
text-align: center; | ||
color: #393939; | ||
} | ||
|
||
.footer { | ||
position: absolute; | ||
bottom: 20px; | ||
font-size: 14px; | ||
color: #7D7D7D; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { useEffect } from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import Logo from '@assets/imgs/logo.png'; | ||
import './SplashScreen.css'; | ||
import Container from '@components/Conatiner/Container' | ||
|
||
interface SplashScreenProps { | ||
onFinished: () => void; | ||
} | ||
|
||
const SplashScreen: React.FC<SplashScreenProps> = ({ onFinished }) => { | ||
const navigate = useNavigate(); | ||
|
||
useEffect(() => { | ||
const timer = setTimeout(() => { | ||
onFinished(); | ||
navigate('/', { replace: true }); | ||
}, 3000); | ||
|
||
return () => clearTimeout(timer); | ||
}, [navigate, onFinished]); | ||
|
||
return ( | ||
<Container> | ||
<section className="splash-container"> | ||
<img src={Logo} alt="Vote Solve Logo" className="logo" /> | ||
<p className="subtitle">์ฐ์ ๊ณ ๋ฏผ, ํจ๊ป ๊ฒฐ์ ํ๊ณ ํด๊ฒฐํ๋ ๊ณต๊ฐ</p> | ||
<footer className="footer">Uh? Ban Team</footer> | ||
</section> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default SplashScreen; |