251201_01_ENH : datatable, autocomplete, user관리 완성

This commit is contained in:
2025-12-02 13:45:35 +09:00
parent 74de3d58f7
commit 310506d9ef
45 changed files with 5313 additions and 368 deletions

View File

@@ -7,23 +7,27 @@ import {StorageKeys} from "@/store/storage/storage-keys";
import {useEffect} from "react";
import {nextApi} from "@/lib/http-client";
import {useLoading} from "@/hooks/useLoading";
import {apiError} from "@/lib/http-util";
const LogoutPage = () => {
const { get: getLoginTypeStorage, set: setLoginTypeStorage } = useStorage(StorageKeys.LoginType);
const { logout } = useAuth();
const { auth, logout } = useAuth();
const { clearSelectedProject } = useSelectedProject();
const { withLoadingAsync } = useLoading();
const router = useRouter();
useEffect(() => {
const runLogout = async () => {
const userId = auth.user?.userId ?? "";
clearSelectedProject();
logout();
try {
await nextApi.del("/api/logout", {});
await nextApi.post(`/logout/${userId}`);
} catch (e) {
console.error("로그아웃 API 호출 실패", e);
const err = apiError(e);
console.error(err.status, err.code, err.message);
}
const loginType = getLoginTypeStorage();