Fix tenant mail route segment name (#659)

This commit is contained in:
shenlan 2025-11-09 19:46:40 +08:00 committed by GitHub
parent cf9f0a3c8e
commit 3783fde141
4 changed files with 11 additions and 11 deletions

View File

@ -4,11 +4,11 @@ import ComposeForm from '../../../../components/mail/ComposeForm'
type PageProps = {
params: Promise<{
slug: string
tenantId: string
}>
}
export default async function ComposePage({ params }: PageProps) {
const { slug } = await params
return <ComposeForm tenantId={slug} />
const { tenantId } = await params
return <ComposeForm tenantId={tenantId} />
}

View File

@ -4,12 +4,12 @@ import { useRouter } from 'next/navigation'
import MessageView from '../../../../../components/mail/MessageView'
export default function MessageDetailPage({ params }: { params: { slug: string; id: string } }) {
export default function MessageDetailPage({ params }: { params: { tenantId: string; id: string } }) {
const router = useRouter()
return (
<div className="flex flex-col gap-4">
<MessageView
tenantId={params.slug}
tenantId={params.tenantId}
messageId={params.id}
showBackButton
onBack={() => router.back()}

View File

@ -4,11 +4,11 @@ import MailDashboard from '../../../components/mail/MailDashboard'
type PageProps = {
params: Promise<{
slug: string
tenantId: string
}>
}
export default async function TenantMailPage({ params }: PageProps) {
const { slug } = await params
return <MailDashboard tenantId={slug} tenantName={slug} />
const { tenantId } = await params
return <MailDashboard tenantId={tenantId} tenantName={tenantId} />
}

View File

@ -4,11 +4,11 @@ import MailSettings from '../../../../components/mail/MailSettings'
type PageProps = {
params: Promise<{
slug: string
tenantId: string
}>
}
export default async function MailSettingsPage({ params }: PageProps) {
const { slug } = await params
return <MailSettings tenantId={slug} />
const { tenantId } = await params
return <MailSettings tenantId={tenantId} />
}