Add a top bar component, fix auth
This commit is contained in:
parent
217a0d3952
commit
4794541436
8
src/app/_components/ui/top_bar.tsx
Normal file
8
src/app/_components/ui/top_bar.tsx
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
export function Top_Bar() {
|
||||
return (
|
||||
<div className="top-bar w-full h-16 bg-black text-white">
|
||||
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1,8 +1,10 @@
|
||||
import "~/styles/globals.css";
|
||||
|
||||
import { GeistSans } from "geist/font/sans";
|
||||
import type { Metadata } from "next";
|
||||
import { Top_Bar } from "~/app/_components/ui/top_bar";
|
||||
import { SessionProvider } from "next-auth/react";
|
||||
|
||||
export const metadata = {
|
||||
export const metadata: Metadata = {
|
||||
title: "Create T3 App",
|
||||
description: "Generated by create-t3-app",
|
||||
icons: [{ rel: "icon", url: "/favicon.ico" }],
|
||||
@ -15,7 +17,12 @@ export default function RootLayout({
|
||||
}) {
|
||||
return (
|
||||
<html lang="en" className={`${GeistSans.variable}`}>
|
||||
<body>{children}</body>
|
||||
<body>
|
||||
<SessionProvider>
|
||||
<Top_Bar />
|
||||
{children}
|
||||
</SessionProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ export const env = createEnv({
|
||||
NODE_ENV: z
|
||||
.enum(["development", "test", "production"])
|
||||
.default("development"),
|
||||
NEXTAUTH_SECRET:
|
||||
AUTH_SECRET:
|
||||
process.env.NODE_ENV === "production"
|
||||
? z.string()
|
||||
: z.string().optional(),
|
||||
@ -35,7 +35,7 @@ export const env = createEnv({
|
||||
runtimeEnv: {
|
||||
DATABASE_URL: process.env.DATABASE_URL,
|
||||
NODE_ENV: process.env.NODE_ENV,
|
||||
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
|
||||
AUTH_SECRET: process.env.AUTH_SECRET,
|
||||
AUTH_GITHUB_ID: process.env.AUTH_GITHUB_ID,
|
||||
AUTH_GITHUB_SECRET: process.env.AUTH_GITHUB_SECRET,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user