import type { Metadata } from 'next'
import { getEventProducts } from '@/lib/server-products'
import { getSiteRecommendations } from '@/lib/server-site'
import { EventsPageClient } from './EventsPageClient'

export const metadata: Metadata = { title: '活动报名' }

export default async function EventsPage() {
  const [events, recommendations] = await Promise.all([getEventProducts(), getSiteRecommendations(['events.carousel'])])
  return <EventsPageClient events={events} featuredSlots={recommendations.placements['events.carousel'] || []} />
}
