-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: loading 상태에 필요한 skeleton 제작 (#488)
* feat: 데이터 추가 mock api 연결 * refactor: 인증 필요 없는 기능 client 변경 * feat: mse 동영상, 리뷰 기능 구현 (#472) * refactor: api 훅 함수로 분리, 적용 (#472) * refactor: 쓰지 않는 파일 삭제 (#472) * fix: console log 삭제 (#472) * Squashed commit of the following: commit 6e00687 Author: Jeremy <[email protected]> Date: Fri Sep 15 17:18:33 2023 +0900 bug: 옵션관련 ux 개선 (#474) * fix: 검색창 옵션 수정 (#473) * fix: 지도 줌 limit 설정 (#473) * fix: 모바일 환경에서 거리순으로 설정 (#473) * design: 오버레이 마커 디자인 개선 (#473) * fix: 오류 수정 (#476) * refactor: useScrollBlock 보강 (#476) * refactor: 모바일 페이지 컴포넌트 분리 (#476) * refactor: 라우터 재설정 (#476) * fix: 잘못된 import 수정 (#476) * refactor: router 및 outlet 새로 설정 (#476) * feat: NavBar 관련 Skeleton 제작 (#480) * feat: NavBar 관련 Skeleton 제작 (#480) * refactor: navBarSkeleton의 NavItem 개수를 props로 받도록 설정 (#480)
- Loading branch information
Showing
6 changed files
with
115 additions
and
3 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
frontend/src/components/@common/NavItem/NavItemSkeleton.tsx
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,51 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { BORDER_RADIUS, paintSkeleton } from '~/styles/common'; | ||
|
||
function NavItemSkeleton() { | ||
return ( | ||
<StyledNavItem> | ||
<div /> | ||
<div> | ||
<span /> | ||
</div> | ||
</StyledNavItem> | ||
); | ||
} | ||
|
||
export default NavItemSkeleton; | ||
|
||
const StyledNavItem = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
width: 68px; | ||
border: none; | ||
background: none; | ||
& > div { | ||
${paintSkeleton} | ||
} | ||
& > div:first-child { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 36px; | ||
height: 36px; | ||
border-radius: 50%; | ||
margin-bottom: 0.4rem; | ||
} | ||
& > div:last-child { | ||
width: 40px; | ||
height: 12px; | ||
border-radius: ${BORDER_RADIUS.xs}; | ||
} | ||
`; |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import NavItem from '~/components/@common/NavItem/NavItem'; | ||
import NavItemSkeleton from './NavItemSkeleton'; | ||
|
||
export { NavItemSkeleton }; | ||
export default NavItem; |
57 changes: 57 additions & 0 deletions
57
frontend/src/components/MainPageNavBar/MainPageNavBarSkeleton.tsx
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,57 @@ | ||
import styled from 'styled-components'; | ||
import { NavItemSkeleton } from '../@common/NavItem'; | ||
|
||
interface MainPageNavBarSkeletonProps { | ||
navItemLength: number; | ||
} | ||
|
||
function MainPageNavBarSkeleton({ navItemLength }: MainPageNavBarSkeletonProps) { | ||
return ( | ||
<StyledNavBar> | ||
<NavItemSkeleton /> | ||
<StyledLine /> | ||
<div> | ||
{Array.from({ length: navItemLength }, () => ( | ||
<NavItemSkeleton /> | ||
))} | ||
</div> | ||
</StyledNavBar> | ||
); | ||
} | ||
|
||
export default MainPageNavBarSkeleton; | ||
|
||
const StyledNavBar = styled.nav` | ||
display: flex; | ||
align-items: center; | ||
position: sticky; | ||
top: 80px; | ||
z-index: 11; | ||
width: 100%; | ||
height: 80px; | ||
background-color: var(--white); | ||
padding-left: 1.2rem; | ||
border-bottom: 1px solid var(--gray-1); | ||
& > div:last-child { | ||
display: flex; | ||
align-items: center; | ||
& > * { | ||
margin: 0 0.6rem; | ||
} | ||
} | ||
`; | ||
|
||
const StyledLine = styled.div` | ||
margin-left: 1.2rem; | ||
width: 1px; | ||
height: 46px; | ||
background-color: var(--gray-3); | ||
`; |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import MainPageNavBar from './MainPageNavBar'; | ||
import MainPageNavBarSkeleton from './MainPageNavBarSkeleton'; | ||
|
||
export { MainPageNavBarSkeleton }; | ||
export default MainPageNavBar; |
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