Merge remote-tracking branch 'origin/main' into iipbs/sn/dev
This commit is contained in:
@@ -27,6 +27,13 @@
|
||||
background: transparent !important;
|
||||
color: #fff;
|
||||
}
|
||||
button[role="button"].primary {
|
||||
background-color: #008E8D !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
nav a {
|
||||
@apply text-white;
|
||||
}
|
||||
}
|
||||
|
||||
/* 상단 메뉴 호버 시 하단 라인 */
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import { images } from "@common/assets";
|
||||
import { getConfig } from "@common/config";
|
||||
import { ENDPOINT } from "../../config";
|
||||
import { setCookie, getCookie } from "../../lib";
|
||||
import { setCookie, getCookie, removeCookie } from "../../lib";
|
||||
import {
|
||||
getPopupInfo,
|
||||
getUserPopupList,
|
||||
@@ -70,6 +70,24 @@ export function Header({ viewOnly }: { viewOnly?: boolean }) {
|
||||
method: "POST",
|
||||
});
|
||||
if (!response.ok) throw new Error("Failed to logout");
|
||||
|
||||
// 쿠키 삭제
|
||||
if (appConfig.AUTH_USER_ID) {
|
||||
removeCookie(appConfig.AUTH_USER_ID);
|
||||
}
|
||||
if (appConfig.REFRESH_TOKEN) {
|
||||
removeCookie(appConfig.REFRESH_TOKEN);
|
||||
}
|
||||
if (appConfig.ACCESS_TOKEN) {
|
||||
removeCookie(appConfig.ACCESS_TOKEN);
|
||||
}
|
||||
if (appConfig.CLAIM_NAME) {
|
||||
removeCookie(appConfig.CLAIM_NAME);
|
||||
}
|
||||
|
||||
removeCookie("site-id-key");
|
||||
removeCookie("site-theme-key");
|
||||
|
||||
window.location.href = "/auth/login";
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
@@ -157,27 +175,27 @@ export function Header({ viewOnly }: { viewOnly?: boolean }) {
|
||||
</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div className="flex items-center">
|
||||
{mounted && userSiteList?.content && userSiteList.content.length > 0 && (
|
||||
<nav className="flex items-center gap-6">
|
||||
{userSiteList.content.map((site, index) => (
|
||||
<div key={site.siteId} className="flex items-center">
|
||||
<a
|
||||
href={site.dmnAddr}
|
||||
className="text-2xl font-medium text-foreground hover:text-primary transition-colors header-nav-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{site.siteNm}
|
||||
</a>
|
||||
{index < userSiteList.content.length - 1 && (
|
||||
<div className="w-px h-6 bg-border ml-6"></div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</nav>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center">
|
||||
{mounted && userSiteList?.content && userSiteList.content.length > 0 && (
|
||||
<nav className="flex items-center gap-6">
|
||||
{userSiteList.content.map((site, index) => (
|
||||
<div key={site.siteId} className="flex items-center">
|
||||
<a
|
||||
href={site.dmnAddr}
|
||||
className="text-2xl font-medium text-foreground hover:text-primary transition-colors header-nav-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{site.siteNm}
|
||||
</a>
|
||||
{index < userSiteList.content.length - 1 && (
|
||||
<div className="w-px h-6 bg-border ml-6"></div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</nav>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<SearchForm />
|
||||
{mounted ? (
|
||||
|
||||
@@ -23,6 +23,7 @@ const PageTitle = ({
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<div className="flex items-center gap-3">메뉴얼</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user