Skip to content

Commit

Permalink
feat: 아티클 상세 페이지 구현 및 routing
Browse files Browse the repository at this point in the history
  • Loading branch information
limgyumin committed Sep 16, 2023
1 parent aaca810 commit f569755
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/article/[slug]/@comments/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { CommentForm } from "components/article/@comments/comment-form";
import { Comments } from "components/article/@comments/comments";

const CommentsPage = () => {
return (
<div className="flex flex-col gap-3">
<CommentForm />
<Comments />
</div>
);
};

export default CommentsPage;
20 changes: 20 additions & 0 deletions app/article/[slug]/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { PropsWithChildren, ReactNode } from "react";

type Props = {
comments: ReactNode;
};

const ArticleLayout = ({ children, comments }: PropsWithChildren<Props>) => {
return (
<div className="flex justify-center">
<div className="page relative">
<div className="flex flex-col gap-12 py-20">
{children}
{comments}
</div>
</div>
</div>
);
};

export default ArticleLayout;
15 changes: 15 additions & 0 deletions app/article/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Author } from "components/article/author";
import { Content } from "components/article/content";
import { Summary } from "components/article/summary";

const ArticlePage = () => {
return (
<>
<Summary />
<Content />
<Author />
</>
);
};

export default ArticlePage;

0 comments on commit f569755

Please sign in to comment.