diff --git a/apps/web/src/app/blog/article/[id]/page.tsx b/apps/web/src/app/blog/article/[id]/page.tsx index b8350e5..e2635eb 100644 --- a/apps/web/src/app/blog/article/[id]/page.tsx +++ b/apps/web/src/app/blog/article/[id]/page.tsx @@ -1,5 +1,7 @@ import { FC } from 'react'; +import ArticlePage from '@/components/blog/ArticleDetail'; + interface BlogArticlePageProps { params: { id: string }; } @@ -7,7 +9,11 @@ interface BlogArticlePageProps { export const runtime = 'edge'; const BlogArticlePage: FC = ({ params }) => { - return <>{params.id}; + return ( + <> + + + ); }; export default BlogArticlePage; diff --git a/apps/web/src/components/blog/ArticleDetail.tsx b/apps/web/src/components/blog/ArticleDetail.tsx new file mode 100644 index 0000000..d65e864 --- /dev/null +++ b/apps/web/src/components/blog/ArticleDetail.tsx @@ -0,0 +1,65 @@ +import Link from 'next/link'; + +import { gateway } from '@/gateway'; + +import { BlockRenderer } from '../notion/renderer'; + +interface ArticlePageProps { + id: string; +} + +async function ArticlePage({ id }: ArticlePageProps) { + const article = await gateway.blog.article.query({ id }); + + return ( +
+
+ + + 블로그 홈 가기 + + {article.thumbnail && ( +
+ Thumbnail Image +
+ )} +
+ {article.category && ( + <> + + + {article.category} + + + + )} +
+

+ {article.title} +

+
+ {/* {article.publishedAt && format(article.publishedAt, 'yyyy.MM.dd')} */} + {article.publishedAt.toString()} +
+
+
Subpage not allowed
} /> +
+
+
+ ); +} + +export default ArticlePage; + +function BackIcon(props: React.SVGProps) { + return ( + + + + ); +}