first commit

This commit is contained in:
Michaël
2026-01-29 14:13:11 -03:00
commit 2302748c87
105 changed files with 93301 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
import { notFound } from 'next/navigation';
import { Metadata } from 'next';
import { getLegalPage, getAllLegalSlugs } from '@/lib/legal';
import LegalPageLayout from '@/components/layout/LegalPageLayout';
interface PageProps {
params: { slug: string };
}
// Generate static params for all legal pages
export async function generateStaticParams() {
const slugs = getAllLegalSlugs();
return slugs.map((slug) => ({ slug }));
}
// Generate metadata for SEO
export async function generateMetadata({ params }: PageProps): Promise<Metadata> {
const legalPage = getLegalPage(params.slug);
if (!legalPage) {
return {
title: 'Not Found',
};
}
return {
title: `${legalPage.title} | Spanglish`,
description: `${legalPage.title} for Spanglish - Language Exchange Community in Paraguay`,
};
}
export default function LegalPage({ params }: PageProps) {
const legalPage = getLegalPage(params.slug);
if (!legalPage) {
notFound();
}
return (
<LegalPageLayout
title={legalPage.title}
content={legalPage.content}
lastUpdated={legalPage.lastUpdated}
/>
);
}