diff --git a/apps/frontend/src/app/tags/[...slug]/page.tsx b/apps/frontend/src/app/tags/[...slug]/page.tsx new file mode 100644 index 00000000..2c76eeca --- /dev/null +++ b/apps/frontend/src/app/tags/[...slug]/page.tsx @@ -0,0 +1,44 @@ +import { Metadata, NextPage } from 'next'; +import { ContentsLayout } from '@/components/Layout'; +import { PagePath } from '@/lib/router'; +import clsx from 'clsx'; +import Link from 'next/link'; + +export const metadata: Metadata = { + title: 'Tags | tatsutakein.jp', + description: 'Ryo Takeuchi のポートフォリオサイトです。', +}; + +interface PageProps { + params: { slug: string[] }; + searchParams: { [key: string]: string | string[] | undefined }; +} + +const Tags: NextPage = ({ params: { slug } }) => { + const tags = slug; + + return ( + +

Tags

+ + {/* Tags */} +
+ {tags.map((tag) => ( + + # {tag} + + ))} +
+
+ ); +}; + +export default Tags; diff --git a/apps/frontend/src/features/blog/components/HeroImage.tsx b/apps/frontend/src/features/blog/components/HeroImage.tsx index c36fe895..b3f9adbe 100644 --- a/apps/frontend/src/features/blog/components/HeroImage.tsx +++ b/apps/frontend/src/features/blog/components/HeroImage.tsx @@ -74,7 +74,7 @@ export const HeroImage = ({ {tags.map((tag) => ( # {tag} diff --git a/apps/frontend/src/lib/router/PagePath.ts b/apps/frontend/src/lib/router/PagePath.ts index ebaf2eb6..e40d42b6 100644 --- a/apps/frontend/src/lib/router/PagePath.ts +++ b/apps/frontend/src/lib/router/PagePath.ts @@ -28,8 +28,8 @@ export const PagePath = { /** * タグ検索結果ページ */ - tagResult(tag: string, withOrigin?: boolean): string { - const path = `/tag/${tag}`; + tagResult(tags: string[], withOrigin?: boolean): string { + const path = `/tags/${tags.join('/')}`; return withOrigin ? PagePath.withOrigin(path) : path; },