setup done
This commit is contained in:
@@ -1,16 +1,107 @@
|
||||
import { Geist, Geist_Mono } from "next/font/google"
|
||||
import localFont from "next/font/local"
|
||||
|
||||
import "@workspace/ui/globals.css"
|
||||
import { Providers } from "@/components/providers"
|
||||
|
||||
const fontSans = Geist({
|
||||
subsets: ["latin"],
|
||||
const firaSans = localFont({
|
||||
src: [
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-Thin.ttf",
|
||||
weight: "100",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-ThinItalic.ttf",
|
||||
weight: "100",
|
||||
style: "italic",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-ExtraLight.ttf",
|
||||
weight: "200",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-ExtraLightItalic.ttf",
|
||||
weight: "200",
|
||||
style: "italic",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-Light.ttf",
|
||||
weight: "300",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-LightItalic.ttf",
|
||||
weight: "300",
|
||||
style: "italic",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-Regular.ttf",
|
||||
weight: "400",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-Italic.ttf",
|
||||
weight: "400",
|
||||
style: "italic",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-Medium.ttf",
|
||||
weight: "500",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-MediumItalic.ttf",
|
||||
weight: "500",
|
||||
style: "italic",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-SemiBold.ttf",
|
||||
weight: "600",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-SemiBoldItalic.ttf",
|
||||
weight: "600",
|
||||
style: "italic",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-Bold.ttf",
|
||||
weight: "700",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-BoldItalic.ttf",
|
||||
weight: "700",
|
||||
style: "italic",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-ExtraBold.ttf",
|
||||
weight: "800",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-ExtraBoldItalic.ttf",
|
||||
weight: "800",
|
||||
style: "italic",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-Black.ttf",
|
||||
weight: "900",
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
path: "../fonts/Fira-sans/FiraSans-BlackItalic.ttf",
|
||||
weight: "900",
|
||||
style: "italic",
|
||||
},
|
||||
],
|
||||
variable: "--font-sans",
|
||||
})
|
||||
|
||||
const fontMono = Geist_Mono({
|
||||
subsets: ["latin"],
|
||||
variable: "--font-mono",
|
||||
const marcellus = localFont({
|
||||
src: "../fonts/Marcellus/Marcellus-Regular.ttf",
|
||||
variable: "--font-marcellus",
|
||||
})
|
||||
|
||||
export default function RootLayout({
|
||||
@@ -21,7 +112,7 @@ export default function RootLayout({
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body
|
||||
className={`${fontSans.variable} ${fontMono.variable} font-sans antialiased `}
|
||||
className={`${firaSans.variable} ${marcellus.variable} font-sans antialiased `}
|
||||
>
|
||||
<Providers>{children}</Providers>
|
||||
</body>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import Login from "@/components/login";
|
||||
import Studs from "@/components/studs";
|
||||
import { db, students } from "@workspace/db";
|
||||
import { signIn, signOut } from "@workspace/auth";
|
||||
import { db, admins } from "@workspace/db";
|
||||
import { auth, signIn, signOut } from "@workspace/auth";
|
||||
|
||||
async function getStudents() {
|
||||
"use server";
|
||||
const s = await db.select().from(students);
|
||||
const s = await db.select().from(admins);
|
||||
console.log(s);
|
||||
}
|
||||
|
||||
@@ -20,11 +20,12 @@ async function logOut() {
|
||||
}
|
||||
|
||||
export default async function Page() {
|
||||
const session = await auth()
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-svh">
|
||||
<div className="flex flex-col items-center justify-center gap-4">
|
||||
<h1 className="text-2xl font-bold">Hello admins</h1>
|
||||
<Login logIn={logIn} />
|
||||
{!session?.user && <Login logIn={logIn} />}
|
||||
<Studs action={getStudents} logOut={logOut} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user