Files
bewell-in-ua/app/(protected)/admin/category/[...slug]/page.tsx
2025-03-11 02:54:09 +02:00

27 lines
621 B
TypeScript

import {auth} from '@/auth'
import AdminPermission from '@/components/(protected)/admin/auth/permission'
import {CreateForm} from '@/components/(protected)/admin/category/create-form'
import ProductCreateEditForm from '@/components/(protected)/admin/product/create-edit-form'
import {dump} from '@/lib/utils'
export default async function Page({
params
}: {
params: Promise<{slug?: string[]}>
}) {
const session = await auth()
const {slug} = await params
switch ((slug || [])[0]) {
case 'create':
return (
<>
<AdminPermission />
<CreateForm />
</>
)
}
return <div>{dump(slug)}</div>
}