Added few configurations & mores
This commit is contained in:
24
app/dashboard/parametres/configuration/page.tsx
Normal file
24
app/dashboard/parametres/configuration/page.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { redirect } from 'next/navigation';
|
||||
import { getCurrentUser } from '@/lib/auth';
|
||||
import { hasPageAccess } from '@/lib/permissions';
|
||||
import DashboardLayout from '@/components/DashboardLayout';
|
||||
import ConfigurationContent from '@/components/ConfigurationContent';
|
||||
|
||||
export default async function ConfigurationPage() {
|
||||
const user = await getCurrentUser();
|
||||
|
||||
if (!user) {
|
||||
redirect('/login');
|
||||
}
|
||||
|
||||
const hasAccess = await hasPageAccess(user.id, '/dashboard/parametres/configuration');
|
||||
if (!hasAccess) {
|
||||
redirect('/dashboard/parametres');
|
||||
}
|
||||
|
||||
return (
|
||||
<DashboardLayout user={user}>
|
||||
<ConfigurationContent />
|
||||
</DashboardLayout>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user