14 lines
295 B
TypeScript
14 lines
295 B
TypeScript
|
|
import { redirect } from 'next/navigation';
|
||
|
|
|
||
|
|
interface Props {
|
||
|
|
params: Promise<{ locale: string }>;
|
||
|
|
}
|
||
|
|
|
||
|
|
export default async function HomePage({ params }: Props) {
|
||
|
|
// 等待 params 解析
|
||
|
|
const { locale } = await params;
|
||
|
|
|
||
|
|
// 自动重定向到 dashboard
|
||
|
|
redirect(`/${locale}/dashboard`);
|
||
|
|
}
|