xpeditis2.0/apps/frontend/app/[locale]/dashboard/admin/[[...rest]]/page.tsx
2026-06-13 11:53:27 +02:00

12 lines
454 B
TypeScript

import { redirect } from 'next/navigation';
// Legacy redirect: the admin area moved from /dashboard/admin/* to /admin/*.
// Keeps old links and bookmarks working.
type Params = { locale: string; rest?: string[] };
export default async function LegacyAdminRedirect({ params }: { params: Promise<Params> }) {
const { locale, rest } = await params;
const sub = rest && rest.length ? `/${rest.join('/')}` : '';
redirect(`/${locale}/admin${sub}`);
}