Skip to content

Commit

Permalink
fix: 투표 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
goeun208 committed Feb 23, 2024
1 parent b321c36 commit f9596de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/vote/VoteChoiceOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const VoteChoiceOption = ({
style={{
backgroundColor: isClosed && voteMax?.bestPlaceId === bestPlaceId ? '#FFEADB' : '',
}}>
{votePlaceIds.includes(bestPlaceId) ? (
{checkedBox ? (
<div style={{ pointerEvents: isClosed ? 'none' : 'auto' }} onClick={() => setCheckedBox(!checkedBox)}>
<CheckBox />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/vote/detail/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ const VoteDetailPage = () => {

//보류 --- 재투표 버튼 눌렀을 때 체크한 데이터 저장하기
useEffect(() => {
const temp = voteData?.voteStatuses.filter((item) => item.isVoted);
// const temp = voteData?.voteStatuses.filter((item) => item.isVoted);
// temp?.map((item) => votePlaceIds.push(item.bestPlaceId));
temp?.map((item) => setVoteIds([...voteIds, item.bestPlaceId]));
// temp?.map((item) => setVoteIds([...voteIds, item.bestPlaceId]));
}, [clickedAgainBtn]);

useEffect(() => {
Expand Down

0 comments on commit f9596de

Please sign in to comment.