import { headers } from 'next/headers'
import { redirect } from 'next/navigation'
import { resolveServerAppUrl } from '@/lib/appUrls'

export default function PlatformOperationsPage() {
  const requestHeaders = headers()
  const adminUrl = resolveServerAppUrl(
    process.env.NEXT_PUBLIC_ADMIN_URL ?? 'http://localhost:3002',
    requestHeaders.get('host'),
    requestHeaders.get('x-forwarded-proto'),
  )

  redirect(`${adminUrl}/dashboard`)
}
