Skip to content

Commit

Permalink
Merge pull request #164 from KDT-hahahoho/Feat/#148
Browse files Browse the repository at this point in the history
Feat/#148
  • Loading branch information
HuiseonDev authored Nov 19, 2024
2 parents e018bf3 + 891160e commit 770fb86
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/pages/emotion/message/EmotionMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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": "#내용 #내용 #내용"
Expand Down
14 changes: 13 additions & 1 deletion src/pages/emotion/result/EmotionResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -31,6 +40,9 @@ const EmotionResult = () => {
// if (!data) return <div>로딩중.. 데이터가 없음</div>;

const handleClick = () => {
resetEmotion();
resetAnalysisResult();
resetPrevRecord();
navigate('/');
};

Expand Down

0 comments on commit 770fb86

Please sign in to comment.