import { redirect } from "next/navigation"
import { MailSettingsSectionFromSegments } from "@/components/gmail/settings/mail-settings-section-view"

export default async function MailSettingsSectionPage({
  params,
}: {
  params: Promise<{ section?: string[] }>
}) {
  const { section } = await params
  if (section?.[0] === "signatures") {
    redirect("/mail/settings/accounts")
  }
  return <MailSettingsSectionFromSegments segments={section} />
}
