diff --git a/.gitignore b/.gitignore index 8460eea..68f70b0 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,8 @@ yarn-error.log* # vercel .vercel +.vscode +.env # typescript *.tsbuildinfo diff --git a/app/layout.tsx b/app/layout.tsx index d4d2f47..052087f 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -6,8 +6,6 @@ import { ThemeProvider } from "@/components/theme-provider"; import { SessionProvider } from "next-auth/react"; import { auth } from "@/auth"; import { Toaster } from "@/components/ui/sonner"; -import Navbar from "@/components/Navbar"; -import { cookies } from "next/headers"; import { AuthProvider } from "@/context/userContext"; export const metadata: Metadata = { @@ -30,7 +28,7 @@ export default async function RootLayout({ const session = await auth(); // const isAuthenticated = cookies().get("authjs.session-token"); return ( - + ) : (
- + - +
diff --git a/components/nav/rightside.tsx b/components/nav/rightside.tsx index 155de6b..7855345 100644 --- a/components/nav/rightside.tsx +++ b/components/nav/rightside.tsx @@ -28,6 +28,7 @@ import { TooltipProvider } from "../ui/tooltip"; import { Separator } from "../ui/separator"; import { User } from "@prisma/client"; import { ASSET_BASE_URL } from "@/resources"; +import { LogoutButton } from "../auth/logout-button"; const Rightside = ({ user }: { user: User | null }) => { return ( @@ -148,6 +149,9 @@ const Rightside = ({ user }: { user: User | null }) => {

Add repositories

+ + logout + diff --git a/routes.ts b/routes.ts index 3575d49..cf895e8 100644 --- a/routes.ts +++ b/routes.ts @@ -5,8 +5,7 @@ */ export const publicRoutes = [ "/dashboard", - "/auth/new-verification", - "/:username" + "/auth/new-verification" ]; /** @@ -33,4 +32,4 @@ export const apiAuthPrefix = "/api/auth"; * The default redirect path after logging in * @type {string} */ -export const DEFAULT_LOGIN_REDIRECT = "/new"; \ No newline at end of file +export const DEFAULT_LOGIN_REDIRECT = "/"; \ No newline at end of file