fixed styles, improved PaginatedTableStyling
This commit is contained in:
@@ -6,6 +6,9 @@ import {
|
||||
} from '@radix-ui/react-icons';
|
||||
import { HorizontalNav, VerticalNav } from '../_components/Nav';
|
||||
import { Toaster } from 'react-hot-toast';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { getServerSession } from '../api/auth/[...nextauth]/auth';
|
||||
import { headers } from 'next/headers';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Create Next App',
|
||||
@@ -17,6 +20,10 @@ export default async function RootLayout({
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
const session = await getServerSession();
|
||||
|
||||
if (!session) redirect(`/login`);
|
||||
|
||||
return (
|
||||
<div
|
||||
className="hero min-h-screen"
|
||||
|
||||
Reference in New Issue
Block a user