Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions apps/web/src/app/[locale]/epoch1000/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Epoch1000Experience from "@/components/epoch1000/Epoch1000Experience";
import type { Metadata } from "next";
import { getAlternates, Link } from "@workspace/i18n/routing";
import { getTranslations } from "@workspace/i18n/server";

type Props = { params: Promise<{ locale: string }> };

const EPOCH1000_PATH = "/epoch1000";
const EPOCH1000_SOCIAL_IMAGE = "/api/epoch1000/og?s=1000&fe=0&c=1000";

export default async function Page() {
const t = await getTranslations("epoch1000.page");

Expand Down Expand Up @@ -33,20 +37,35 @@ export default async function Page() {
);
}

export async function generateMetadata({ params }: Props) {
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { locale } = await params;
const t = await getTranslations("epoch1000.meta");
const title = t("title");
const description = t("description");
const alternates = getAlternates(EPOCH1000_PATH, locale);

return {
title: t("title"),
description: t("description"),
alternates: getAlternates("/epoch1000", locale),
title,
description,
alternates,
openGraph: {
title: t("openGraphTitle"),
description: t("openGraphDescription"),
type: "website",
url: alternates.canonical,
images: [
{
url: EPOCH1000_SOCIAL_IMAGE,
width: 1200,
height: 630,
},
],
},
twitter: {
card: "summary_large_image",
title,
description,
images: [EPOCH1000_SOCIAL_IMAGE],
},
};
}
2 changes: 1 addition & 1 deletion packages/i18n/messages/web/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -7745,7 +7745,7 @@
"bannerLabel": "Get started now"
},
"epochHero": {
"eyebrow": "Solana Mainnet-Beta · March 2020 → Now",
"eyebrow": "Solana Mainnet · March 2020 → Now",
"title": "One thousand epochs \n<light>in the making.</light>",
"subtitle": "Every ~2 days since 2020, Solana has closed an epoch — 432,000 slots of blocks, votes, and payments. Epoch 1000 is almost here.",
"cta": "Join the celebration",
Expand Down
Loading