From 1527ab35da6ef7c53d8462512e25fba21e588368 Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 11 Nov 2024 10:28:06 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=A0=9C?= =?UTF-8?q?=ED=92=88=ED=8A=B9=EC=9D=B4=EC=82=AC=ED=95=AD=20=ED=8C=9D?= =?UTF-8?q?=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../estimate/popup/ProductFeaturesPop.jsx | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/components/estimate/popup/ProductFeaturesPop.jsx b/src/components/estimate/popup/ProductFeaturesPop.jsx index 428c6a8e..3940065d 100644 --- a/src/components/estimate/popup/ProductFeaturesPop.jsx +++ b/src/components/estimate/popup/ProductFeaturesPop.jsx @@ -1,12 +1,23 @@ 'use client' -import { useState } from 'react' +import { useEffect, useState } from 'react' import { useMessage } from '@/hooks/useMessage' export default function ProductFeaturesPop({ specialNoteList, showProductFeatureData, setProductFeaturesPopupOpen }) { - console.log('위에서 넘어온거::', specialNoteList) - console.log('위에서 넘어온거::', showProductFeatureData) - //split('、') - + const [showSpecialNoteList, setShowSpecialNoteList] = useState([]) const { getMessage } = useMessage() + + useEffect(() => { + let pushData = [] + specialNoteList.map((row) => { + let option = showProductFeatureData.split('、') + option.map((row2) => { + if (row.code === row2) { + pushData.push(row) + } + }) + }) + setShowSpecialNoteList(pushData) + }, [specialNoteList]) + return (
@@ -26,10 +37,15 @@ export default function ProductFeaturesPop({ specialNoteList, showProductFeature
-
-
제목
-
내용
-
+ {showSpecialNoteList.length > 0 && + showSpecialNoteList.map((row) => { + return ( +
+
{row.codeNm}
+
+
+ ) + })}