Skip to content

Commit

Permalink
Merge pull request #21 from ruru-m07/main
Browse files Browse the repository at this point in the history
BUG FIXING 🐞
  • Loading branch information
ruru-m07 authored Feb 8, 2024
2 parents 3cd88f8 + 2ed1e6e commit 5c605a5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ yarn-error.log*

# vercel
.vercel
.vscode
.env

# typescript
*.tsbuildinfo
Expand Down
4 changes: 1 addition & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -30,7 +28,7 @@ export default async function RootLayout({
const session = await auth();
// const isAuthenticated = cookies().get("authjs.session-token");
return (
<SessionProvider refetchInterval={5 * 60 * 60} session={session}>
<SessionProvider refetchInterval={5 * 60 * 60} refetchOnWindowFocus={false} session={session}>
<html lang="en">
<body>
<ThemeProvider
Expand Down
4 changes: 2 additions & 2 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ const Navbar = ({
<Rightside user={user as User} />
) : (
<div className="flex items-center justify-center h-auto gap-3 mr-4">
<Link href={"/login"}>
<Link href={"/auth/login"}>
<Button variant={"ghost"}>Sign in</Button>
</Link>
<Link href={"/signup"}>
<Link href={"/auth/signup"}>
<Button variant={"outline"}>Sign up</Button>
</Link>
</div>
Expand Down
4 changes: 4 additions & 0 deletions components/nav/rightside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -148,6 +149,9 @@ const Rightside = ({ user }: { user: User | null }) => {
<BookMarked size={16} />
<p className="ml-2">Add repositories</p>
</Link>
<LogoutButton>
logout
</LogoutButton>
</div>
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
*/
export const publicRoutes = [
"/dashboard",
"/auth/new-verification",
"/:username"
"/auth/new-verification"
];

/**
Expand All @@ -33,4 +32,4 @@ export const apiAuthPrefix = "/api/auth";
* The default redirect path after logging in
* @type {string}
*/
export const DEFAULT_LOGIN_REDIRECT = "/new";
export const DEFAULT_LOGIN_REDIRECT = "/";

1 comment on commit 5c605a5

@vercel
Copy link

@vercel vercel bot commented on 5c605a5 Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.