From 7457e7d1016ae9cace46c7a92344a39d17cdcff5 Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 22 Oct 2025 10:40:22 +0900 Subject: [PATCH] =?UTF-8?q?chmod:=20auth-wrapper.tsx=20pathname=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20(=EC=B6=94=ED=9B=84=20=EB=8B=A4=EC=8B=9C?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20=ED=95=84=EC=9A=94)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/fo/src/entities/auth/lib/auth-wrapper.tsx | 5 ++--- apps/sn/src/entities/auth/lib/auth-wrapper.tsx | 5 ++--- apps/wr/src/entities/auth/lib/auth-wrapper.tsx | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/apps/fo/src/entities/auth/lib/auth-wrapper.tsx b/apps/fo/src/entities/auth/lib/auth-wrapper.tsx index 67e00d0b8..0d69c260d 100644 --- a/apps/fo/src/entities/auth/lib/auth-wrapper.tsx +++ b/apps/fo/src/entities/auth/lib/auth-wrapper.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect } from "react"; -import { useRouter, usePathname } from "next/navigation"; +import { useRouter } from "next/navigation"; import { client } from "@/src/shared/api"; import type { IUserInfo } from "@/src/shared/store"; import { useUserStore, getCookie } from "@/src/shared/lib"; @@ -12,7 +12,6 @@ import { LoginApi } from "../api/login-service"; const AuthWrapper = ({ children }: { children: React.ReactNode }) => { const router = useRouter(); - const pathname = usePathname(); const { userInfo, setUserInfo } = useUserStore((state) => state); async function authCheck() { @@ -53,7 +52,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => { } } })(); - }, [pathname]); + }, []); return <>{children}; }; diff --git a/apps/sn/src/entities/auth/lib/auth-wrapper.tsx b/apps/sn/src/entities/auth/lib/auth-wrapper.tsx index ba2bb04aa..e1b7f67d5 100644 --- a/apps/sn/src/entities/auth/lib/auth-wrapper.tsx +++ b/apps/sn/src/entities/auth/lib/auth-wrapper.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect } from "react"; -import { useRouter, usePathname } from "next/navigation"; +import { useRouter } from "next/navigation"; import { client } from "@/shared/api"; import type { IUserInfo } from "@/shared/store"; import { useUserStore } from "@/shared/lib"; @@ -14,7 +14,6 @@ import { LoginApi } from "../api/login-service"; const AuthWrapper = ({ children }: { children: React.ReactNode }) => { const router = useRouter(); - const pathname = usePathname(); const { userInfo, setUserInfo } = useUserStore((state) => state); async function authCheck() { @@ -55,7 +54,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => { } } })(); - }, [pathname]); + }, []); return <>{children}; }; diff --git a/apps/wr/src/entities/auth/lib/auth-wrapper.tsx b/apps/wr/src/entities/auth/lib/auth-wrapper.tsx index 24fd520d4..1a4461c3f 100644 --- a/apps/wr/src/entities/auth/lib/auth-wrapper.tsx +++ b/apps/wr/src/entities/auth/lib/auth-wrapper.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect } from "react"; -import { useRouter, usePathname } from "next/navigation"; +import { useRouter } from "next/navigation"; import { client } from "../../../shared/api"; import type { IUserInfo } from "../../../shared/store"; import { useUserStore } from "../../../shared/lib"; @@ -14,7 +14,6 @@ import { LoginApi } from "../api/login-service"; const AuthWrapper = ({ children }: { children: React.ReactNode }) => { const router = useRouter(); - const pathname = usePathname(); const { userInfo, setUserInfo } = useUserStore((state) => state); async function authCheck() { @@ -55,7 +54,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => { } } })(); - }, [pathname]); + }, []); return <>{children}; };