feat: full site build — Project/Melody schema (Option A), admin CRUD, public sections, uploads, email+SMTP, internal analytics, legal pages, docs
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import type { Metadata } from "next";
|
||||
import { notFound } from "next/navigation";
|
||||
import ProjectDirectory from "@/components/public/project-directory";
|
||||
import { getActiveLocale, isLocale, type Locale } from "@/lib/i18n";
|
||||
import { getProjectDirectoryCopy } from "@/lib/project-content";
|
||||
|
||||
type AppsPageProps = {
|
||||
params: { locale: string };
|
||||
searchParams: { category?: string };
|
||||
};
|
||||
|
||||
export function generateMetadata({ params }: { params: { locale: string } }): Metadata {
|
||||
if (!isLocale(params.locale)) return {};
|
||||
const locale = getActiveLocale(params.locale as Locale);
|
||||
const copy = getProjectDirectoryCopy(locale, "APP");
|
||||
return { title: copy.title, description: copy.description };
|
||||
}
|
||||
|
||||
export default function AppsPage({ params, searchParams }: AppsPageProps) {
|
||||
if (!isLocale(params.locale)) notFound();
|
||||
const locale = getActiveLocale(params.locale as Locale);
|
||||
return <ProjectDirectory locale={locale} type="APP" categorySlug={searchParams.category} />;
|
||||
}
|
||||
Reference in New Issue
Block a user