- Updated routing for mail settings to redirect to the new settings layout. - Introduced new account layout and section components for better organization. - Replaced hardcoded paths with constants for account and mail settings to enhance maintainability. - Removed deprecated mail settings layout and integrated it into the new settings structure. - Enhanced user experience by streamlining navigation between account and mail settings.
16 lines
534 B
TypeScript
16 lines
534 B
TypeScript
import { redirect } from "next/navigation"
|
|
import { MailSettingsSectionFromSegments } from "@/components/gmail/settings/mail-settings-section-view"
|
|
import { MAIL_SETTINGS_BASE_PATH } from "@/lib/mail-settings/settings-nav"
|
|
|
|
export default async function SettingsSectionPage({
|
|
params,
|
|
}: {
|
|
params: Promise<{ section?: string[] }>
|
|
}) {
|
|
const { section } = await params
|
|
if (section?.[0] === "signatures") {
|
|
redirect(`${MAIL_SETTINGS_BASE_PATH}/accounts`)
|
|
}
|
|
return <MailSettingsSectionFromSegments segments={section} />
|
|
}
|