[common/components] fix: siteId 가져오는 방식 수정

This commit is contained in:
2025-08-11 12:26:17 +09:00
parent 579db080a3
commit 10abca7d35
4 changed files with 28 additions and 28 deletions
-1
View File
@@ -27,7 +27,6 @@
"@/*": ["./*"],
"@common/assets": ["../../../../packages/common/assets/dist/"],
"@common/components": ["../../../../packages/common/components/dist/"],
"@common/config": ["../../../../packages/common/config/dist/"],
"@common/network": ["../../../../packages/common/network/"]
}
},
@@ -1,8 +1,9 @@
import { useQuery } from "@tanstack/react-query";
import { useRef } from "react";
import Autoplay from "embla-carousel-autoplay";
import { getConfig } from "@common/config";
import { useQuery } from "@tanstack/react-query";
import { ENDPOINT } from "../../config";
import { getSiteInfo } from "../../api";
import { getCookie } from "../../lib";
import {
Carousel,
CarouselContent,
@@ -10,10 +11,8 @@ import {
CarouselNext,
CarouselPrevious,
} from "../carousel";
import { useRef } from "react";
const appConfig = getConfig();
const siteId = appConfig.SITE_ID ?? "";
const siteId = getCookie("site-id-key") ?? "";
export function Footer() {
const { data: siteInfo } = useQuery({
@@ -21,8 +21,8 @@ import { SearchForm } from "./search-form";
import { NoticePopover } from "./notice-popover";
const appConfig = getConfig();
const siteId = appConfig.SITE_ID ?? "";
const userId = getCookie(appConfig.AUTH_USER_ID ?? "");
const siteId = getCookie("site-id-key") ?? "";
const isLoggedIn = !!userId;
export function Header({ viewOnly }: { viewOnly?: boolean }) {
+23 -21
View File
@@ -40,8 +40,8 @@ import {
} from "../../api";
const appConfig = getConfig();
const appSiteId = appConfig.SITE_ID ?? "";
const userId = getCookie(appConfig.AUTH_USER_ID ?? "");
const appSiteId = getCookie("site-id-key") ?? "";
const isLoggedIn = !!userId;
export function LNB({
@@ -201,7 +201,7 @@ export function LNB({
/>
<span className={cn("whitespace-nowrap", !isSidebarOpen && "hidden")}>
{item.menuKornNm}
</span>
</span>
</MenuButton>
</MenuItem>
);
@@ -282,9 +282,11 @@ export function LNB({
>
<SidebarContent className="bg-background">
<SidebarMenu className="gap-0">
{menuList?.map((item) => <MenuItem key={item.menuCd} item={item} />)}
{menuList?.map((item) => (
<MenuItem key={item.menuCd} item={item} />
))}
</SidebarMenu>
{/* 도움말 아이콘 */}
<div className="mt-auto pb-4">
<Dialog open={isHelpModalOpen} onOpenChange={setIsHelpModalOpen}>
@@ -292,7 +294,7 @@ export function LNB({
<button
className={cn(
"flex h-12 w-full items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
"focus:outline-none"
"focus:outline-none",
)}
title="도움말"
>
@@ -300,22 +302,22 @@ export function LNB({
<span className="ml-2">도움말</span>
</button>
</DialogTrigger>
<DialogContent className="sm:max-w-[85rem]">
<DialogHeader>
<DialogTitle>도움말</DialogTitle>
</DialogHeader>
<div className="py-4">
{currentMenuHelp ? (
<div
className="text-sm leading-relaxed text-muted-foreground"
dangerouslySetInnerHTML={{ __html: currentMenuHelp }}
/>
) : (
<p className="text-sm text-muted-foreground">
현재 페이지에 대한 도움말이 없습니다.
</p>
)}
</div>
<DialogContent className="sm:max-w-[85rem]">
<DialogHeader>
<DialogTitle>도움말</DialogTitle>
</DialogHeader>
<div className="py-4">
{currentMenuHelp ? (
<div
className="text-sm leading-relaxed text-muted-foreground"
dangerouslySetInnerHTML={{ __html: currentMenuHelp }}
/>
) : (
<p className="text-sm text-muted-foreground">
현재 페이지에 대한 도움말이 없습니다.
</p>
)}
</div>
</DialogContent>
</Dialog>
</div>