mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 22:46:27 +00:00
Move auth config and build admin menus
Extract NextAuth configuration into a shared library, load admin sidebar items from role permissions, and update related RBAC types and UI.
This commit is contained in:
@@ -2,12 +2,12 @@ import { FC, Suspense, lazy } from 'react';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { getServerSession } from 'next-auth';
|
||||
import dayjs from 'dayjs';
|
||||
import { authOptions } from '@/pages/api/auth/[...nextauth]';
|
||||
import { Card, Card900, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import LazyLoading from '@/components/loader/LazyLoading';
|
||||
import fetchData, { fetchDataWithPost } from '@/lib/fetchData';
|
||||
import { generateHourMinutes } from '@/lib/helper';
|
||||
import ViewAvatar from '@/components/ViewAvatar';
|
||||
import { authOptions } from '@/lib/auth';
|
||||
|
||||
const DonutChart = lazy(() => import('./DonutChart'));
|
||||
const AreaChart = lazy(() => import('./AreaChart'))
|
||||
|
||||
Reference in New Issue
Block a user