import type { Metadata } from 'next'
import ApiDocs from '@/components/api-docs'

export const generateMetadata = ({ params }: { params: { page?: string } }): Metadata => {
  const page = params.page || 'home'
  const title = page === 'home' ? 'Cat API' : '随机图片 API'
  return { title }
}

export default function Home() {
  return <ApiDocs />
}