Merge branch 'iipbs/sn/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/sn/dev
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useRouter, usePathname } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { client } from "@/src/shared/api";
|
import { client } from "@/src/shared/api";
|
||||||
import type { IUserInfo } from "@/src/shared/store";
|
import type { IUserInfo } from "@/src/shared/store";
|
||||||
import { useUserStore, getCookie } from "@/src/shared/lib";
|
import { useUserStore, getCookie } from "@/src/shared/lib";
|
||||||
@@ -12,7 +12,6 @@ import { LoginApi } from "../api/login-service";
|
|||||||
|
|
||||||
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const pathname = usePathname();
|
|
||||||
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
||||||
|
|
||||||
async function authCheck() {
|
async function authCheck() {
|
||||||
@@ -53,7 +52,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
}, [pathname]);
|
}, []);
|
||||||
|
|
||||||
return <>{children}</>;
|
return <>{children}</>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useRouter, usePathname } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { client } from "@/shared/api";
|
import { client } from "@/shared/api";
|
||||||
import type { IUserInfo } from "@/shared/store";
|
import type { IUserInfo } from "@/shared/store";
|
||||||
import { useUserStore } from "@/shared/lib";
|
import { useUserStore } from "@/shared/lib";
|
||||||
@@ -14,7 +14,6 @@ import { LoginApi } from "../api/login-service";
|
|||||||
|
|
||||||
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const pathname = usePathname();
|
|
||||||
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
||||||
|
|
||||||
async function authCheck() {
|
async function authCheck() {
|
||||||
@@ -55,7 +54,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
}, [pathname]);
|
}, []);
|
||||||
|
|
||||||
return <>{children}</>;
|
return <>{children}</>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useRouter, usePathname } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { client } from "../../../shared/api";
|
import { client } from "../../../shared/api";
|
||||||
import type { IUserInfo } from "../../../shared/store";
|
import type { IUserInfo } from "../../../shared/store";
|
||||||
import { useUserStore } from "../../../shared/lib";
|
import { useUserStore } from "../../../shared/lib";
|
||||||
@@ -14,7 +14,6 @@ import { LoginApi } from "../api/login-service";
|
|||||||
|
|
||||||
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const pathname = usePathname();
|
|
||||||
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
||||||
|
|
||||||
async function authCheck() {
|
async function authCheck() {
|
||||||
@@ -55,7 +54,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
}, [pathname]);
|
}, []);
|
||||||
|
|
||||||
return <>{children}</>;
|
return <>{children}</>;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user