import { channels } from '@/data/channels'; import { notFound } from 'next/navigation'; import styles from './channel-page.module.css'; import SafeImage from '@/components/SafeImage'; import Link from 'next/link'; import ChannelTestimonialSlider from '@/components/ChannelTestimonialSlider'; import ChannelFAQ from '@/components/ChannelFAQ'; import { Calendar, Eye, BarChart, Trophy, Inbox, ShieldCheck, Palette, Layout, Smartphone, Zap, PenTool, Repeat, CheckCircle } from 'lucide-react'; // Define Props interface interface PageProps { params: Promise<{ slug: string }>; } export async function generateStaticParams() { return channels.map((channel) => ({ slug: channel.slug, })); } export async function generateMetadata(props: PageProps) { const params = await props.params; const channel = channels.find((c) => c.slug === params.slug); if (!channel) return { title: 'Channel Not Found' }; return { title: `${channel.title} Management Tool - SocialBuddy`, description: channel.description, }; } // Icon mapping helper const getIcon = (iconName: string) => { switch (iconName) { case 'Calendar': return ; case 'Eye': return ; case 'BarChart': return ; case 'Trophy': return ; case 'Inbox': return ; case 'ShieldCheck': return ; case 'Palette': return ; case 'Layout': return ; case 'Smartphone': return ; case 'Zap': return ; case 'PenTool': return ; case 'Repeat': return ; case 'CheckCircle': return ; default: return ; } }; export default async function ChannelPage(props: PageProps) { const params = await props.params; // Ensure params exists if (!params?.slug) { notFound(); } const channel = channels.find((c) => c.slug === params.slug); if (!channel) { notFound(); } return (
{/* 1. Hero Section */}

{channel.title}

Home / Channels / {channel.title}
{/* 2. About Section */} {channel.about && (
{channel.about.subTitle}

{channel.about.title}

{channel.about.description}

{channel.about.bulletPoints.map((point, i) => (
{getIcon(point.icon)} {point.text}
))}
Start Free Trial
)} {/* 3. Benefits / Why Choose */}
Why SocialBuddy for {channel.title}

Tools Built for Growth

We've built specific tools to help you succeed on {channel.title}. Stop guessing and start growing with data-driven insights.

{channel.benefits.slice(0, 4).map((benefit, index) => (
0{index + 1}

{benefit.title}

{benefit.description}

))}
{/* 4. Testimonials */} {channel.testimonials && channel.testimonials.length > 0 && (
Testimonials

Loved by {channel.title} Creators

)} {/* 5. FAQ */} {channel.faqs && channel.faqs.length > 0 && ( )} {/* 6. CTA (Full Width Floating) */}

Ready to Master {channel.title}?

Join thousands of marketers who are growing their {channel.title} presence with SocialBuddy.

Start Free Trial
); }