diff --git a/src/components/ErrorFallback.tsx b/src/components/ErrorFallback.tsx index 024d4fd..0ad299c 100644 --- a/src/components/ErrorFallback.tsx +++ b/src/components/ErrorFallback.tsx @@ -46,9 +46,11 @@ const ErrorFallback = ({ error, resetErrorBoundary }: ErrorFallbackProps) => { // eslint-disable-next-line no-unsafe-optional-chaining const m = error.response?.data.message ?? ([] as string[]); const mArr = m - .map((x) => - x in ERROR_MAP ? ERROR_MAP[x as keyof typeof ERROR_MAP] : [], - ) + .map((x) => { + if (x in ERROR_MAP) return ERROR_MAP[x as keyof typeof ERROR_MAP]; + if (/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(x)) return x; + return []; + }) .flat(); if (mArr.length > 0) return mArr; } diff --git a/src/pages/SearchDetail/components/AiTabPanel.tsx b/src/pages/SearchDetail/components/AiTabPanel.tsx index 7958753..2cc73f7 100644 --- a/src/pages/SearchDetail/components/AiTabPanel.tsx +++ b/src/pages/SearchDetail/components/AiTabPanel.tsx @@ -28,6 +28,7 @@ const StyledTabPanel = styled.div` width: 100%; justify-content: center; .title { + min-height: 23px; background-image: linear-gradient( to bottom, transparent 50%, @@ -164,13 +165,22 @@ const AiTabPanel = ({ setEnabled(true); }, []); + useEffect(() => { + const el = document.getElementById("easy-title"); + if (el && el.clientHeight > 23) { + el.style.background = "#fff27a"; + } + }, []); + return ( - {data?.easyTitle} + + {data?.easyTitle} + }> { + const el = document.getElementById("law-title"); + if (el && el.clientHeight > 23) { + el.style.background = "#fff27a"; + } + }, []); + return ( - {data.사건명} + + {data.사건명} + - {`현행 법령[시행 ${(() => { + {`현행 법령[시행 ${(() => { const str = data.기본정보.시행일자.toString(); const year = str.slice(0, 4); const month = str.slice(4, 6);