-
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.
refactor: 서버 필터링 스켈레톤 컴포넌트를 구현한다 (#505)
[#504]
- Loading branch information
1 parent
1d6a139
commit f3e2576
Showing
3 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
frontend/src/components/ui/ServerStationFilters/FilterOptionSkeleton.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,35 @@ | ||
import { css } from 'styled-components'; | ||
|
||
import { generateRandomData } from '@utils/randomDataGenerator'; | ||
|
||
import FlexBox from '@common/FlexBox'; | ||
import Skeleton from '@common/Skeleton'; | ||
|
||
const FilterOptionSkeleton = () => { | ||
return ( | ||
<> | ||
<FlexBox | ||
width={30} | ||
direction={'column'} | ||
css={css` | ||
margin-bottom: 4.8rem; | ||
`} | ||
> | ||
<FlexBox justifyContent="between"> | ||
<Skeleton width="15rem" height="2rem" mb={1} /> | ||
<Skeleton width="8rem" height="2rem" mb={1} /> | ||
</FlexBox> | ||
<FlexBox gap={2}> | ||
{Array.from({ length: generateRandomData([10, 15, 20]) }, (_, index) => ( | ||
<Skeleton | ||
key={index} | ||
width={`${generateRandomData([8, 10, 12, 14])}rem`} | ||
height="4rem" | ||
/> | ||
))} | ||
</FlexBox> | ||
</FlexBox> | ||
</> | ||
); | ||
}; | ||
export default FilterOptionSkeleton; |
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
41 changes: 41 additions & 0 deletions
41
frontend/src/components/ui/ServerStationFilters/ServerStationFiltersSkeleton.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,41 @@ | ||
import FlexBox from '@common/FlexBox'; | ||
import Skeleton from '@common/Skeleton'; | ||
|
||
import FilterOptionSkeleton from '@ui/ServerStationFilters/FilterOptionSkeleton'; | ||
import { | ||
borderCss, | ||
filterHeaderCss, | ||
overFlowCss, | ||
} from '@ui/ServerStationFilters/ServerStationFilters'; | ||
|
||
const ServerStationFiltersSkeleton = () => { | ||
return ( | ||
<FlexBox | ||
width={34} | ||
height={'100vh'} | ||
alignItems={'center'} | ||
direction={'column'} | ||
background={'white'} | ||
css={[overFlowCss, borderCss]} | ||
nowrap={true} | ||
noRadius={'all'} | ||
> | ||
<FlexBox | ||
width={34} | ||
height={8} | ||
justifyContent="between" | ||
alignItems="center" | ||
css={filterHeaderCss} | ||
> | ||
<Skeleton width="7rem" height="4rem" /> | ||
<Skeleton width="7rem" height="4rem" /> | ||
<Skeleton width="7rem" height="4rem" /> | ||
</FlexBox> | ||
<FilterOptionSkeleton /> | ||
<FilterOptionSkeleton /> | ||
<FilterOptionSkeleton /> | ||
</FlexBox> | ||
); | ||
}; | ||
|
||
export default ServerStationFiltersSkeleton; |