idek a lot
This commit is contained in:
@ -2,6 +2,7 @@ import "~/styles/globals.css";
|
||||
import { Inter as FontSans } from "next/font/google";
|
||||
import { cn } from "~/lib/utils";
|
||||
import { SessionProvider } from "next-auth/react";
|
||||
import Sign_Out from "~/components/auth/Sign_Out";
|
||||
|
||||
import { type Metadata } from "next";
|
||||
export const metadata: Metadata = {
|
||||
@ -26,6 +27,9 @@ export default function RootLayout({
|
||||
fontSans.variable)}
|
||||
>
|
||||
<SessionProvider>
|
||||
<div className="absolute top-4 right-6">
|
||||
<Sign_Out />
|
||||
</div>
|
||||
{children}
|
||||
</SessionProvider>
|
||||
</body>
|
||||
|
@ -1,20 +1,19 @@
|
||||
import { auth } from "~/auth";
|
||||
import { db } from "~/server/db";
|
||||
import No_Session from "~/components/auth/No_Session";
|
||||
import TT_Header from "~/components/ui/TT_Header";
|
||||
import Techs_Table from "~/components/ui/Techs_Table";
|
||||
|
||||
export default async function HomePage() {
|
||||
const user = await auth();
|
||||
const employees = await db.query.users.findMany({
|
||||
orderBy: (model, {desc}) => desc(model.id),
|
||||
});
|
||||
if (!user) {
|
||||
return (
|
||||
<No_Session />
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<main className="min-h-screen bg-gradient-to-b from-[#111111] to-[#111325] text-white">
|
||||
<h1 className="text-2xl font-semibold">Welcome!</h1>
|
||||
<main className="min-h-screen bg-gradient-to-b from-[#111111] to-[#111325]">
|
||||
<TT_Header />
|
||||
<Techs_Table />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user