diff --git a/README.md b/README.md
index 04f04af8..88c56faf 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
# π Coworkers π
-λλ©νμ΄μ§ μ΄λ―Έμ§ (μΆκ° μμ )
+
+
@@ -52,11 +53,17 @@
### π§© νλ‘ νΈμλ
-### π μ½λ ν¬λ§€ν° λ° κ²μ¬ λꡬ
-
+
+### π μ½λ ν¬λ§€ν° λ° λꡬ
+
+
+
### π€ νμ
λꡬ
+
+
### π λ°°ν¬ νλ«νΌ
+
diff --git a/src/app/[groupId]/editteam/page.tsx b/src/app/[groupId]/editteam/page.tsx
index a996cf24..19e335a4 100644
--- a/src/app/[groupId]/editteam/page.tsx
+++ b/src/app/[groupId]/editteam/page.tsx
@@ -1,3 +1,5 @@
+import { Metadata } from "next";
+import { cookies } from "next/headers";
import EditTeam from "./_components/edit-team";
interface EditTeamPageProps {
@@ -6,6 +8,55 @@ interface EditTeamPageProps {
}>;
}
+async function getAccessToken() {
+ const cookieStore = await cookies();
+ return cookieStore.get("accessToken")?.value;
+}
+
+export async function generateMetadata({
+ params,
+}: EditTeamPageProps): Promise {
+ const { groupId } = await params;
+ const accessToken = await getAccessToken();
+
+ const res = await fetch(
+ `${process.env.NEXT_PUBLIC_API_URL}/groups/${groupId}`,
+ {
+ headers: {
+ Authorization: `Bearer ${accessToken}`,
+ },
+ }
+ );
+
+ const group = await res.json();
+ if (!group) {
+ return {
+ title: "ν μ€μ ",
+ description: "ν μ 보λ₯Ό μμ ν μ μμ΅λλ€.",
+ };
+ }
+
+ return {
+ title: `${group.name} ν μ€μ `,
+ description: `${group.name} μ 보λ₯Ό μμ ν μ μμ΅λλ€.`,
+ openGraph: {
+ title: `${group.name} ν μ€μ | Coworkers`,
+ description: `${group.name} μ 보λ₯Ό μμ ν μ μμ΅λλ€.`,
+ type: "website",
+ url: `https://coworkers-pied.vercel.app/${groupId}/editteam`,
+ siteName: "Coworkers",
+ images: [
+ {
+ url: "https://sprint-fe-project.s3.ap-northeast-2.amazonaws.com/Coworkers/user/2449/open_graph.jpg",
+ width: 1200,
+ height: 630,
+ alt: "Coworkers",
+ },
+ ],
+ },
+ };
+}
+
const EditTeamPage = async ({ params }: EditTeamPageProps) => {
const { groupId } = await params;
diff --git a/src/app/[groupId]/page.tsx b/src/app/[groupId]/page.tsx
index de9166a8..ba92e4ff 100644
--- a/src/app/[groupId]/page.tsx
+++ b/src/app/[groupId]/page.tsx
@@ -1,3 +1,5 @@
+import { Metadata } from "next";
+import { cookies } from "next/headers";
import TeamPageClient from "./_components/team-page-client";
interface TeamPageProps {
@@ -6,6 +8,55 @@ interface TeamPageProps {
}>;
}
+async function getAccessToken() {
+ const cookieStore = await cookies();
+ return cookieStore.get("accessToken")?.value;
+}
+
+export async function generateMetadata({
+ params,
+}: TeamPageProps): Promise {
+ const { groupId } = await params;
+ const accessToken = await getAccessToken();
+
+ const res = await fetch(
+ `${process.env.NEXT_PUBLIC_API_URL}/groups/${groupId}`,
+ {
+ headers: {
+ Authorization: `Bearer ${accessToken}`,
+ },
+ }
+ );
+
+ const group = await res.json();
+ if (!group) {
+ return {
+ title: "ννμ΄μ§",
+ description: "ν νμ΄μ§ μ 보λ₯Ό νμΈν μ μμ΅λλ€.",
+ };
+ }
+
+ return {
+ title: group.name,
+ description: `${group.name} μ 보λ₯Ό νμΈν μ μμ΅λλ€.`,
+ openGraph: {
+ title: `${group.name} | Coworkers`,
+ description: `${group.name} μ 보λ₯Ό νμΈν μ μμ΅λλ€.`,
+ type: "website",
+ url: `https://coworkers-pied.vercel.app/${groupId}`,
+ siteName: "Coworkers",
+ images: [
+ {
+ url: "https://sprint-fe-project.s3.ap-northeast-2.amazonaws.com/Coworkers/user/2449/open_graph.jpg",
+ width: 1200,
+ height: 630,
+ alt: "Coworkers",
+ },
+ ],
+ },
+ };
+}
+
const TeamPage = async ({ params }: TeamPageProps) => {
const { groupId } = await params;
diff --git a/src/app/noteam/page.tsx b/src/app/noteam/page.tsx
index 45c342dd..3aa462ab 100644
--- a/src/app/noteam/page.tsx
+++ b/src/app/noteam/page.tsx
@@ -1,8 +1,30 @@
import { Button } from "@/components/index";
import cn from "@/utils/clsx";
+import type { Metadata } from "next";
import Image from "next/image";
import Link from "next/link";
+export const metadata: Metadata = {
+ title: "ν μμ",
+ description: "μμ§ μμλ νμ΄ μμ΅λλ€.",
+ openGraph: {
+ title: "ν μμ | Coworkers",
+ description: "μμ§ μμλ νμ΄ μμ΅λλ€.",
+ type: "website",
+ url: "https://coworkes.com/mypage",
+ locale: "ko_KR",
+ siteName: "Coworkers",
+ images: [
+ {
+ url: "https://sprint-fe-project.s3.ap-northeast-2.amazonaws.com/Coworkers/user/2449/open_graph.jpg",
+ width: 1200,
+ height: 630,
+ alt: "μμν μμ",
+ },
+ ],
+ },
+};
+
const NoTeam = () => {
return (