Skip to content

Commit 966f4f3

Browse files
committed
chore: blog 서브도메인 제거
1 parent b87820f commit 966f4f3

File tree

19 files changed

+8025
-13942
lines changed

19 files changed

+8025
-13942
lines changed

app/(blog)/layout.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { type ReactNode, Suspense } from "react";
2+
import PostListProvider from "@/app/provider/PostListProvider";
3+
import getAllPosts from "@/entities/post/api/getAllPosts";
4+
import Header from "@/widgets/header/ui/Header";
5+
import Nav from "@/widgets/header/ui/Nav";
6+
import NavSkeleton from "@/widgets/header/ui/skeleton/NavSkeleton";
7+
import Sidebar from "@/widgets/sidebar/ui/Sidebar";
8+
9+
const BlogLayout = ({ children }: { children: ReactNode }) => {
10+
const posts = getAllPosts();
11+
12+
return (
13+
<section className="relative mx-auto max-w-[var(--page-width)] px-4 pt-16 pb-8 sm:px-8">
14+
<Header />
15+
<PostListProvider initialPosts={posts}>
16+
<main className="flex flex-col gap-6 lg:flex-row lg:gap-24">
17+
<div className="flex-1">
18+
<Suspense fallback={<NavSkeleton />}>
19+
<Nav />
20+
</Suspense>
21+
{children}
22+
</div>
23+
<aside className="w-full shrink-0 border-gray-100 lg:w-[320px] lg:border-l dark:border-gray-800">
24+
<div className="sticky top-20">
25+
<Sidebar />
26+
</div>
27+
</aside>
28+
</main>
29+
</PostListProvider>
30+
</section>
31+
);
32+
};
33+
34+
export default BlogLayout;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { Suspense } from "react";
22
import PostList from "@/widgets/post/ui/PostList";
33
import PostListSkeleton from "@/widgets/post/ui/skeleton/PostListSkeleton";
44

5-
const MainPage = () => {
5+
const HomePage = () => {
66
return (
77
<Suspense fallback={<PostListSkeleton />}>
88
<PostList />
99
</Suspense>
1010
);
1111
};
1212

13-
export default MainPage;
13+
export default HomePage;

app/blog/(main)/layout.tsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

app/blog/(main)/loading.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/blog/layout.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

app/page.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)