[st] refactor: 로그인 페이지 auth 그룹으로 분기 처리 (client api 영향 범위에서 벗어나기 위함)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { ChevronRight, HelpCircle } from "lucide-react";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import { useDetectDevice } from "@frontend-opensource/use-react-hooks";
|
||||
import { getConfig } from "@common/config";
|
||||
import { getParentIds } from "./lib";
|
||||
@@ -66,7 +66,13 @@ export function LNB({
|
||||
const [currentMenuCode, setCurrentMenuCode] = useState<number | null>(null);
|
||||
const prevPathRef = useRef(currentPath);
|
||||
const { browser } = useDetectDevice();
|
||||
const { isOpen: isHelpModalOpen, openHelp, closeHelp, setHelpContent, helpContent } = useHelpDialog();
|
||||
const {
|
||||
isOpen: isHelpModalOpen,
|
||||
openHelp,
|
||||
closeHelp,
|
||||
setHelpContent,
|
||||
helpContent,
|
||||
} = useHelpDialog();
|
||||
|
||||
const siteId = propSiteId ?? appSiteId;
|
||||
|
||||
@@ -170,12 +176,12 @@ export function LNB({
|
||||
const handleClick = () => {
|
||||
if (!isSidebarOpen) setOpen(true);
|
||||
setCookie("menu-code-key", item.menuCd.toString());
|
||||
|
||||
|
||||
// newWndwYn이 Y인 경우 새창으로 열기
|
||||
if (item.newWndwYn === "Y") {
|
||||
window.open(item.urlPath, "_blank");
|
||||
}
|
||||
|
||||
|
||||
handleMenuClick?.(item);
|
||||
};
|
||||
|
||||
@@ -295,30 +301,31 @@ export function LNB({
|
||||
|
||||
{/* 도움말 아이콘 */}
|
||||
<div className="mt-auto pb-4">
|
||||
<Dialog open={isHelpModalOpen} onOpenChange={(open) => open ? openHelp() : closeHelp()}>
|
||||
<DialogTrigger asChild>
|
||||
|
||||
</DialogTrigger>
|
||||
<DialogContent className="sm:max-w-[85rem] max-h-[90vh] flex flex-col">
|
||||
<Dialog
|
||||
open={isHelpModalOpen}
|
||||
onOpenChange={(open) => (open ? openHelp() : closeHelp())}
|
||||
>
|
||||
<DialogTrigger asChild></DialogTrigger>
|
||||
<DialogContent className="flex max-h-[90vh] flex-col sm:max-w-[85rem]">
|
||||
<DialogHeader>
|
||||
<DialogTitle>도움말</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="py-4 overflow-y-auto flex-1 min-h-0">
|
||||
<div className="min-h-0 flex-1 overflow-y-auto py-4">
|
||||
{helpContent ? (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '16px',
|
||||
lineHeight: '1.5',
|
||||
style={{
|
||||
fontSize: "16px",
|
||||
lineHeight: "1.5",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
dangerouslySetInnerHTML={{
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: helpContent
|
||||
.replace(/<body[^>]*>/gi, '<div>')
|
||||
.replace(/<\/body>/gi, '</div>')
|
||||
.replace(/<body[^>]*>/gi, "<div>")
|
||||
.replace(/<\/body>/gi, "</div>"),
|
||||
}}
|
||||
style={{
|
||||
fontSize: 'inherit',
|
||||
fontSize: "inherit",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user