chore: migrate to payload / nextjs
This commit is contained in:
12
src/app/(frontend)/[[...slug]]/page.tsx
Normal file
12
src/app/(frontend)/[[...slug]]/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import NextApp from '@/spa/NextApp'
|
||||
|
||||
type Args = {
|
||||
params: Promise<{ slug?: string[] }>
|
||||
}
|
||||
|
||||
export default async function Page({ params }: Args) {
|
||||
const { slug = [] } = await params
|
||||
const pathname = `/${slug.join('/')}`.replace(/\/$/, '') || '/'
|
||||
|
||||
return <NextApp pathname={pathname} />
|
||||
}
|
||||
Reference in New Issue
Block a user