Skip to content

Commit 0c7c97f

Browse files
authored
Merge pull request #314 from CSE-Shaco/develop
feat: guard dashboard routes for core and above
2 parents 6b6dca6 + c074dde commit 0c7c97f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/app/dashboard/layout.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { ReactNode } from 'react'
2+
3+
import ApiCodeGuard from '@/components/auth/ApiCodeGuard'
4+
5+
export default function DashboardLayout({ children }: { children: ReactNode }) {
6+
return (
7+
<ApiCodeGuard requiredRole="CORE" nextOverride="/dashboard">
8+
{children}
9+
</ApiCodeGuard>
10+
)
11+
}

0 commit comments

Comments
 (0)