Skip to content

Commit 279ed04

Browse files
committed
feat: 가게 정보 로딩 중 스켈레톤 컴포넌트 추가
1 parent 8b7773e commit 279ed04

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/app/(store)/stores/[storeId]/_components/StoreStories/StoreStories.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,24 @@ import { Avatar } from "@/app/member/_components/Avatar";
1010
import { storiesByKakaoIdQueryOptions } from "@/app/story/_api";
1111
import CameraIcon from "@/assets/camera.svg";
1212
import { Button } from "@/components/ui/Button";
13+
import { Skeleton } from "@/components/ui/Skeleton";
1314
import { Spacer } from "@/components/ui/Spacer";
1415
import { HStack, VStack } from "@/components/ui/Stack";
1516
import { Text } from "@/components/ui/Text";
16-
import { colors } from "@/styles";
17+
import { colors, radius } from "@/styles";
1718

1819
import * as styles from "./StoreStories.css";
1920

2021
export const StoreStories = ({ storeId }: { storeId: number }) => {
2122
const router = useRouter();
22-
const { data: store } = useQuery(storeDetailQueryOptions(Number(storeId)));
23+
const { data: store, isLoading } = useQuery(
24+
storeDetailQueryOptions(Number(storeId))
25+
);
2326

24-
if (!store) {
27+
if (!store || isLoading) {
2528
return (
2629
<VStack className={styles.storeStoriesContainer}>
27-
<Text>가게 정보를 불러오는 중...</Text>
30+
<Skeleton width={124} height={220} radius={radius[160]} />
2831
</VStack>
2932
);
3033
}

0 commit comments

Comments
 (0)