Skip to content

Commit 8ecb5ee

Browse files
committed
Feat: 게시물 스켈레톤 만듦
1 parent 042a0dd commit 8ecb5ee

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
lines changed

components/pages/main/Feed/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use client';
22

33
import { useState } from 'react';
4-
import PostsList from '@/components/pages/main/Feed/BoardsList';
4+
import BoardsList from '@/components/pages/main/Feed/BoardsList';
55
import FlexBox from '@/components/ui/FlexBox';
66
import FeedHeader from '@/components/pages/main/Feed/FeedHeader';
77
import { BoardList } from '@/types/types';
8-
import PostModal from './BoardsList/BoardModal';
8+
import BoardModal from './BoardsList/BoardModal';
99

1010
export default function Feed() {
1111
const [showModal, setShowModal] = useState(false);
@@ -17,11 +17,11 @@ export default function Feed() {
1717
className={`gap-10 ${showModal ? 'overflow-hidden' : null}`}
1818
>
1919
<FeedHeader />
20-
<PostsList
20+
<BoardsList
2121
setShowModal={setShowModal}
2222
setSelectedBoard={setSelectedBoard}
2323
/>
24-
<PostModal
24+
<BoardModal
2525
showModal={showModal}
2626
setShowModal={setShowModal}
2727
board={selectedBoard}
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import FlexBox from '../FlexBox';
2+
import { Divider, Skeleton } from '../ui';
3+
4+
export default function FeedBoardLoading() {
5+
return (
6+
<FlexBox direction="column" className="gap-10">
7+
{new Array(10).fill('').map((_, index) => (
8+
<div
9+
// eslint-disable-next-line react/no-array-index-key
10+
key={`board-${index}`}
11+
className=" w-[920px] tablet:min-w-[700px]"
12+
>
13+
<FlexBox
14+
direction="column"
15+
justify="between"
16+
className="h-[500px] p-9 rounded-[10px] border-[1px] border-grey-200 gap-4"
17+
>
18+
<FlexBox justify="start" className="w-full gap-[10px]">
19+
<Skeleton className="rounded-full w-14 h-14" />
20+
<Skeleton className="h-10 rounded-lg w-60" />
21+
</FlexBox>
22+
<Divider type="horizontal" />
23+
<div className="flex flex-row w-full h-full gap-9">
24+
<Skeleton className="w-2/3 h-full rounded-lg" />
25+
<div className="flex flex-col w-1/3 gap-3">
26+
<Skeleton className="w-full rounded-lg h-1/3" />
27+
<Divider type="horizontal" />
28+
<Skeleton className="w-full rounded-lg h-2/3" />
29+
</div>
30+
</div>
31+
</FlexBox>
32+
</div>
33+
))}
34+
</FlexBox>
35+
);
36+
}

0 commit comments

Comments
 (0)