import { redirect } from 'next/navigation'

import { getPortalUrl } from '@/lib/platform-urls'

export default function LegacyPortalCatchAllPage({
  params,
}: {
  params: { slug?: string[] }
}) {
  const slug = params.slug?.join('/') ?? ''
  redirect(getPortalUrl(slug ? `/${slug}` : '/'))
}
