From db16f27814eff864fdab38b28e1ce63a9d9ec5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=84=ED=9D=AC=EC=84=A0?= Date: Tue, 19 Nov 2024 15:37:23 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20feat:=20=ED=94=84=EB=A1=AC?= =?UTF-8?q?=ED=94=84=ED=8A=B8=20=EC=9D=91=EB=8B=B5=20=ED=98=95=EC=8B=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/emotion/message/EmotionMessage.tsx | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/pages/emotion/message/EmotionMessage.tsx b/src/pages/emotion/message/EmotionMessage.tsx index e0df372..e5cff5b 100644 --- a/src/pages/emotion/message/EmotionMessage.tsx +++ b/src/pages/emotion/message/EmotionMessage.tsx @@ -192,20 +192,20 @@ const EmotionMessage = () => { **응답 형식**: { "prediction": { - "totalScore": "숫자", - "social": "숫자", - "sexual": "숫자", - "relational": "숫자", - "refusing": "숫자", - "essential": "숫자" + "totalScore": 숫자, + "social": 숫자, + "sexual": 숫자, + "relational": 숫자, + "refusing": 숫자, + "essential": 숫자 }, "emotions": { - "joy": "숫자", - "sadness": "숫자", - "anger": "숫자", - "fear": "숫자", - "surprise": "숫자", - "disgust": "숫자" + "joy": 숫자, + "sadness": 숫자, + "anger": 숫자, + "fear": 숫자, + "surprise": 숫자, + "disgust": 숫자 }, "missions": ["내용", "내용"], "keywords": "#내용 #내용 #내용" From 891160e94c567de53b9cf500cf6068b57bee9efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=84=ED=9D=AC=EC=84=A0?= Date: Tue, 19 Nov 2024 15:37:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=9A=A7=20cont:=20=EB=A9=94=EC=9D=B8?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20->=20=EC=A0=84=EC=97=AD=EC=83=81=ED=83=9C?= =?UTF-8?q?=20=EC=A0=80=EC=9E=A5=20=EA=B0=92=20reset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/emotion/result/EmotionResult.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pages/emotion/result/EmotionResult.tsx b/src/pages/emotion/result/EmotionResult.tsx index 9cc3bf6..49a4941 100644 --- a/src/pages/emotion/result/EmotionResult.tsx +++ b/src/pages/emotion/result/EmotionResult.tsx @@ -8,10 +8,19 @@ import ECharts from 'echarts-for-react'; // import { useEffect, useState } from 'react'; import Button from '@components/common/Button'; import { useNavigate } from 'react-router-dom'; +import usePrevRecordStore from '@store/usePrevRecordStore'; +import useEmotionStore from '@store/useEmotionStore'; const EmotionResult = () => { - const analysisResult = useAnalysisStore((state) => state.analysis) || { keywords: [] }; + const analysisResult = useAnalysisStore((state) => state.analysis); + const prevRecord = usePrevRecordStore((state) => state.record); + const resetEmotion = useEmotionStore((state) => state.reset); + const resetAnalysisResult = useAnalysisStore((state) => state.reset); + const resetPrevRecord = useAnalysisStore((state) => state.reset); const navigate = useNavigate(); + + console.log(prevRecord); + console.log(analysisResult); // const [data, setData] = useState(null); // const result_pk = 1; @@ -31,6 +40,9 @@ const EmotionResult = () => { // if (!data) return
로딩중.. 데이터가 없음
; const handleClick = () => { + resetEmotion(); + resetAnalysisResult(); + resetPrevRecord(); navigate('/'); };