Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL committed Dec 3, 2024
1 parent 4415cf3 commit f6ef0de
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pageTemplates/layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable @next/next/no-before-interactive-script-outside-document */

import axios from "axios";
import { signOut, useSession } from "next-auth/react";
import dynamic from "next/dynamic";
import { usePathname } from "next/navigation";
import { useRouter } from "next/router";
import { signOut, useSession } from "next-auth/react";
import { useEffect, useMemo, useState } from "react";

import BottomNav from "../../components/BottomNav";
Expand Down Expand Up @@ -65,11 +65,7 @@ function Layout({ children }: ILayout) {
if (status === "loading" || session === undefined) return;
const role = session?.user.role;
if (role === "newUser") {
router.push("/login");
toast(
"info",
"접속 권한이 없습니다. 다시 로그인 해주세요! 반복되는 경우 관리자에게 문의 부탁드립니다.",
);
router.push("/register/name");
return;
}
if (role === "waiting") {
Expand Down

0 comments on commit f6ef0de

Please sign in to comment.