import { resources } from '@/data/resources'; import { notFound } from 'next/navigation'; import SafeImage from '@/components/SafeImage'; import styles from '../resources.module.css'; import Link from 'next/link'; interface PageProps { params: Promise<{ slug: string }>; } export async function generateStaticParams() { return resources.map((resource) => ({ slug: resource.slug, })); } export async function generateMetadata(props: PageProps) { const params = await props.params; const resource = resources.find((r) => r.slug === params.slug); if (!resource) return { title: 'Resource Not Found' }; return { title: `${resource.title} - SocialBuddy Resources`, description: resource.excerpt, }; } export default async function ResourceDetailPage(props: PageProps) { const params = await props.params; if (!params?.slug) { notFound(); } const resource = resources.find((r) => r.slug === params.slug); if (!resource) { notFound(); } return (
{/* Standardized Hero/Banner Section */}

{resource.title}

Home / Resources / {resource.title}
{/* Featured Image */}
{/* Content Body */} {/* Content Body */}
{/* Back to Resources */}
View All Resources
); }