diff --git a/app/achievements/page.tsx b/app/achievements/page.tsx index cc58fb43..700b28f6 100644 --- a/app/achievements/page.tsx +++ b/app/achievements/page.tsx @@ -1,12 +1,31 @@ import Achievements from "@/components/achievements/Achievements"; import { getAllAchievements } from "@/lib/server/achievements"; import connectDB from "@/lib/db/connection"; +import type { Metadata } from "next"; -export const metadata = { - title: "Achievements", - description: "Achievements page", -}; +const PAGE_URL = "https://www.pointblank.club/achievements"; +const PAGE_TITLE = "Achievements | Point Blank"; +const PAGE_DESCRIPTION = + "See the milestones and achievements of Point Blank — recognitions, wins, and accomplishments from our community."; +export const metadata: Metadata = { + title: PAGE_TITLE, + description: PAGE_DESCRIPTION, + alternates: { + canonical: PAGE_URL, + }, + openGraph: { + title: PAGE_TITLE, + description: PAGE_DESCRIPTION, + url: PAGE_URL, + type: "website", + }, + twitter: { + card: "summary_large_image", + title: PAGE_TITLE, + description: PAGE_DESCRIPTION, + }, +}; export default async function AchievementsPage() { await connectDB(); const achievements = await getAllAchievements(); diff --git a/app/events/page.tsx b/app/events/page.tsx index e974f811..89fd812b 100644 --- a/app/events/page.tsx +++ b/app/events/page.tsx @@ -1,20 +1,63 @@ import type { Metadata } from "next"; -import Events from "@/components/events/Events"; import ReviewMarquee from "@/components/events/ReviewMarquee"; import { getAllEvents } from "@/lib/server/events"; import connectDB from "@/lib/db/connection"; +import Events, { type Event } from "@/components/events/Events"; + +const PAGE_URL = "https://www.pointblank.club/events"; +const PAGE_TITLE = "Events | Point Blank"; +const PAGE_DESCRIPTION = + "Discover upcoming and past events by Point Blank — workshops, hackathons, talks, and meetups for student developers and tech enthusiasts."; export const metadata: Metadata = { - title: "Events", + title: PAGE_TITLE, + description: PAGE_DESCRIPTION, + alternates: { + canonical: PAGE_URL, + }, + openGraph: { + title: PAGE_TITLE, + description: PAGE_DESCRIPTION, + url: PAGE_URL, + type: "website", + }, + twitter: { + card: "summary_large_image", + title: PAGE_TITLE, + description: PAGE_DESCRIPTION, + }, }; export default async function EventsPage() { await connectDB(); const rawEvents = await getAllEvents(); - const events = JSON.parse(JSON.stringify(rawEvents)); - + const events: Event[] = JSON.parse(JSON.stringify(rawEvents)); return ( <> +