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

export default function RenterSignInPage() {
  const requestHeaders = headers()
  const dashboardUrl = resolveServerAppUrl(
    process.env.NEXT_PUBLIC_DASHBOARD_URL ?? 'http://localhost:3001/dashboard',
    requestHeaders.get('host'),
    requestHeaders.get('x-forwarded-proto'),
  )
  redirect(`${dashboardUrl}/sign-in`)
}
