Skip to content

Commit

Permalink
Merge pull request #32 from IT-Cotato/hotfix/TS-11_fix_toggle_button_…
Browse files Browse the repository at this point in the history
…in_scorer_page

Hotfix/ts 11 fix toggle button in scorer page
  • Loading branch information
WONYOUNG-HC authored Jun 27, 2024
2 parents 0c090bd + 280e3d7 commit 64811b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/components/ToggleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const ToggleButton = ({ toggled, onClick }: Props) => {
};

export default React.memo(ToggleButton);
// export default ToggleButton;

const Label = styled.label`
position: relative;
Expand Down
7 changes: 6 additions & 1 deletion src/pages/CS/manage/scorer/QuizScorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,16 @@ const QuizScorer = () => {
setQuizStart(quizData.start);
}
});
}, [quizList]);
}, [quizList, quizId]);

useEffect(() => {
const newSubmitList: IQuizAdminSubmit[] = record?.records;
newSubmitList?.sort((left, right) => left.ticketNumber - right.ticketNumber);
if (quizStart === 'QUIZ_OFF' && newSubmitList?.length) {
setQuizStatus('QUIZ_ON');
setQuizStart('QUIZ_ON');
}

setSubmits(newSubmitList);
setScorer(record?.scorer);
}, [record]);
Expand Down

0 comments on commit 64811b4

Please sign in to comment.