diff --git a/src/app/recruit/[id]/page.tsx b/src/app/recruit/[id]/page.tsx index 6d5eb44e7..e0e7c6763 100644 --- a/src/app/recruit/[id]/page.tsx +++ b/src/app/recruit/[id]/page.tsx @@ -1,6 +1,7 @@ import React from 'react' import axios from 'axios' import RecruitDetailPage from '@/app/recruit/[id]/panel/RecruitDetailPage' +import NextSeo from '@/components/NextSeo' export const dynamic = 'force-dynamic' @@ -24,5 +25,17 @@ export default async function RecruitDetailIndex({ // console.error(e) } - return + const webMetadata = { + title: data?.title, + description: data?.content, + url: `https://peer-study.co.kr/`, + image: data?.image, + } + + return ( + <> + + + + ) } diff --git a/src/components/NextSeo.tsx b/src/components/NextSeo.tsx new file mode 100644 index 000000000..d6e43287f --- /dev/null +++ b/src/components/NextSeo.tsx @@ -0,0 +1,32 @@ +const NextSeo = ({ + webMetadata, +}: { + webMetadata: { + title: string + description: string + url: string + image: string + } +}) => { + return ( + <> + {/* Html meta tag */} + {webMetadata?.title} + + {/* Facebook meta tag */} + + + + + + {/* Twitter meta tag */} + + + + + + + ) +} + +export default NextSeo