-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat/#363] Intro 페이지 추가 #364
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import { lazy } from "react"; | ||
import * as S from "./Loading.styled"; | ||
|
||
const LoadingAnimation = lazy(() => import("@components/commons/loading/LoadingAnimation")); | ||
import LoadingAnimation from "./LoadingAnimation"; | ||
|
||
Comment on lines
1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p5) 이거 이렇게 바꾼 이유가 궁금합니다!!🫣🫢😦 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p5) 저도 궁금합니다 ! 아마 처음엔 초기 로딩 성능을 최적화하려고 동적 import를 한 것 같은데, 오히려 LoadingAnimation 이 늦게 import 되는 단점 같은 게 발생했던건가요..? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 맞아요! 예전에 Next.js를 했을 때 애니메이션을 저 방식으로 lazy import 해왔는데! |
||
const Loading = () => { | ||
return ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import styled from "styled-components"; | ||
|
||
export const StyledIntroImg = styled.img` | ||
width: 37.5rem; | ||
min-height: 100vh; | ||
`; | ||
|
||
export const FooterContainer = styled.div` | ||
position: relative; | ||
|
||
/* 구분선 없애기 위해서 조금 올려주었습니다. */ | ||
bottom: 0.2rem; | ||
padding: 1.6rem 2.4rem 4rem; | ||
|
||
background-color: ${({ theme }) => theme.colors.black}; | ||
`; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as S from "./Intro.styled"; | ||
import IntroImg from "../../../src/assets/images/intro.png"; | ||
import { Button } from "@components/commons"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
const Intro = () => { | ||
const navigate = useNavigate(); | ||
|
||
const handleClick = () => { | ||
navigate("/main"); | ||
}; | ||
|
||
return ( | ||
<> | ||
<S.StyledIntroImg src={IntroImg} /> | ||
|
||
<S.FooterContainer> | ||
<Button onClick={handleClick}>BEAT 바로가기</Button> | ||
</S.FooterContainer> | ||
</> | ||
); | ||
}; | ||
|
||
export default Intro; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p5) 역시 우리 리드야~ 벌써 pr을 올리잖아~ 하고 들어왔다가 깜짝아!