feat(animation-sources): add content-driven guide system

This commit is contained in:
Poyraz
2026-08-29 17:33:25 +03:00
parent 4ffcaf18cd
commit a019910d61
15 changed files with 1850 additions and 49 deletions
+45
View File
@@ -0,0 +1,45 @@
import type { Metadata } from "next";
import { getTranslations } from "next-intl/server";
import { AnimationSourcesContent } from "@/components/animation-sources-content";
import { listAnimationSources } from "@/data/animation-sources";
type AnimationSourcesPageProps = {
params: Promise<{ locale: string }>;
};
export async function generateMetadata({
params,
}: AnimationSourcesPageProps): Promise<Metadata> {
const { locale } = await params;
const t = await getTranslations({ locale, namespace: "AnimationSources" });
return {
title: t("title"),
description: t("description"),
alternates: {
canonical: "/animation-sources",
},
};
}
export default async function AnimationSourcesPage({
params,
}: AnimationSourcesPageProps) {
const { locale } = await params;
const [sources, t] = await Promise.all([
listAnimationSources(locale),
getTranslations({ locale, namespace: "AnimationSources" }),
]);
return (
<AnimationSourcesContent
sources={sources}
labels={{
title: t("title"),
description: t("description"),
empty: t("empty"),
itemCount: t("itemCount", { count: sources.length }),
}}
/>
);
}