File tree Expand file tree Collapse file tree 3 files changed +6
-10
lines changed
app/(with-contexts)/dashboard Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,11 +6,15 @@ import { ADMIN_PERMISSIONS } from "@ui-config/constants";
66
77export default async function Page ( ) {
88 const profile = ( await getProfile ( ) ) as Profile ;
9- if ( checkPermission ( profile . permissions , ADMIN_PERMISSIONS ) ) {
9+ if ( ! profile ) {
10+ redirect ( "/logout/server" ) ;
11+ }
12+
13+ if ( checkPermission ( profile ?. permissions , ADMIN_PERMISSIONS ) ) {
1014 redirect ( "/dashboard/overview" ) ;
1115 } else {
1216 redirect ( "/dashboard/my-content" ) ;
1317 }
1418
15- return null ;
19+ return < > </ > ;
1620}
Original file line number Diff line number Diff line change 11/// <reference types="next" />
22/// <reference types="next/image-types/global" />
3- /// <reference types="next/navigation-types/compat/navigation" />
43/// <reference path="./.next/types/routes.d.ts" />
54
65// NOTE: This file should not be edited
You can’t perform that action at this time.
0 commit comments