From cfbae171a359c268b6014ba0ea35dc8b3982e972 Mon Sep 17 00:00:00 2001 From: seoyeon_jang Date: Sun, 13 Aug 2023 12:00:33 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=20=EC=83=89=EA=B9=94=20=EA=B3=A0?= =?UTF-8?q?=EC=B9=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit ad25a8965a9c81df3d8ea308312b451e5f6aaf4c) --- src/pages/SearchDetail/components/AiTabPanel.tsx | 12 +++++++++++- src/pages/SearchDetail/components/TabPanel.tsx | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) 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); From 3c944a79feaef167b845a44b776b3bbd482ce720 Mon Sep 17 00:00:00 2001 From: seoyeon_jang Date: Sun, 13 Aug 2023 12:05:35 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:sparkles:=20=EC=97=90=EB=9F=AC=EC=97=90=20?= =?UTF-8?q?=ED=95=9C=EA=B8=80=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=EC=9E=88?= =?UTF-8?q?=EC=9C=BC=EB=A9=B4=20=EC=B6=9C=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 15aca064eeb9feff5bd3737432172ce588f88aab) --- src/components/ErrorFallback.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; }