Skip to content

Commit b7d422d

Browse files
committed
modify: build error 수정
1 parent 6ed6b4b commit b7d422d

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

app/blog/(main)/layout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ReactNode } from "react";
1+
import { type ReactNode, Suspense } from "react";
22
import PostListProvider from "@/app/provider/PostListProvider";
33
import getAllPosts from "@/entities/post/api/getAllPosts";
44
import Nav from "@/widgets/header/ui/Nav";
@@ -11,7 +11,9 @@ const Layout = ({ children }: { children: ReactNode }) => {
1111
<PostListProvider initialPosts={posts}>
1212
<main className="flex flex-col gap-6 lg:flex-row lg:gap-24">
1313
<div className="flex-1">
14-
<Nav />
14+
<Suspense fallback={<div className="h-10" />}>
15+
<Nav />
16+
</Suspense>
1517
{children}
1618
</div>
1719
<aside className="w-full shrink-0 border-gray-100 lg:w-[320px] lg:border-l dark:border-gray-800">

src/widgets/post/ui/skeleton/PostWidgetSkeleton.tsx

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,29 @@ import Skeleton from "react-loading-skeleton";
22

33
const PostWidgetSkeleton = () => {
44
return (
5-
<article className="relative flex h-full w-full flex-row justify-between gap-4 px-6 py-6 sm:h-48 sm:py-4 sm:pr-2 sm:pl-7 lg:gap-0">
6-
<div className="flex-1">
7-
<div className="mb-3 w-full gap-2">
8-
<Skeleton width="70%" height={32} borderRadius={6} />
5+
<article className="flex w-full flex-row justify-between gap-1 border-b border-gray-100 py-8 lg:max-w-[680px] dark:border-gray-800">
6+
<div className="flex flex-1 flex-col justify-center pr-4">
7+
{/* Title */}
8+
<div className="mb-2">
9+
<Skeleton width="60%" height={32} />
910
</div>
10-
11-
<div className="flex flex-row gap-9">
12-
<p className="flex flex-row items-center gap-1">
13-
<Skeleton width={120} height={16} borderRadius={4} />
14-
</p>
15-
16-
<p className="flex flex-row items-center gap-1">
17-
<Skeleton width={100} height={16} borderRadius={4} />
18-
</p>
19-
20-
<p className="hidden flex-row items-center gap-1 sm:flex">
21-
<Skeleton width={80} height={16} borderRadius={4} />
22-
</p>
11+
12+
{/* Description */}
13+
<div className="mb-4 space-y-2">
14+
<Skeleton count={2} height={20} />
2315
</div>
2416

25-
<div className="mt-4 space-y-2 pr-4">
26-
<Skeleton height={16} borderRadius={4} />
27-
<Skeleton width="80%" height={16} borderRadius={4} />
17+
{/* Date / Metadata */}
18+
<div className="flex gap-2">
19+
<Skeleton width={100} height={16} />
20+
<Skeleton width={60} height={16} />
2821
</div>
2922
</div>
23+
24+
{/* Thumbnail Placeholder */}
25+
<div className="hidden h-[112px] w-[112px] shrink-0 sm:block">
26+
<Skeleton height={112} width={112} borderRadius={8} />
27+
</div>
3028
</article>
3129
);
3230
};

0 commit comments

Comments
 (0)