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

export const metadata: Metadata = { title: '培训课程' }

export default async function CoursesPage() {
  const [courses, recommendations] = await Promise.all([getCourseProducts(), getSiteRecommendations(['courses.carousel'])])
  return <CoursesPageClient courses={courses} featuredSlots={recommendations.placements['courses.carousel'] || []} />
}
