+ {candidates ? (
+ candidates.map((candidate, i) => (
+
+ {isCandidateSelecting && (
+
addCandidateInSelectedList(candidate.id)}
+ />
+ )}
+
+
+
+
+
+ {candidate.memo}
+
+
+
+
+ ))
+ ) : (
+
+ )}
+
+ );
+};
+
+export default CandidateList;
diff --git a/src/components/Vote/VoteContent/VoteContent.module.scss b/src/components/Vote/VoteContent/VoteContent.module.scss
index da46117f..64459e1d 100644
--- a/src/components/Vote/VoteContent/VoteContent.module.scss
+++ b/src/components/Vote/VoteContent/VoteContent.module.scss
@@ -30,30 +30,4 @@
color: $neutral900;
}
}
- &__candidateList {
- margin-bottom: 50px;
-
- display: flex;
- flex-direction: column;
- gap: 32px;
- }
-}
-
-.candidateBox {
- &__memo {
- display: flex;
- align-items: center;
- gap: 6px;
-
- margin-top: 16px;
- &__text {
- height: 2.2rem;
- @include typography(bodySmall);
- color: $neutral900;
- background-color: $neutral100;
-
- padding: 0 16px;
- border-radius: 8px;
- }
- }
}
diff --git a/src/components/Vote/VoteContent/VoteContent.tsx b/src/components/Vote/VoteContent/VoteContent.tsx
index 08c9962c..e0be7e81 100644
--- a/src/components/Vote/VoteContent/VoteContent.tsx
+++ b/src/components/Vote/VoteContent/VoteContent.tsx
@@ -1,12 +1,15 @@
-import { Avatar, Icon } from "@chakra-ui/react";
+import { Icon } from "@chakra-ui/react";
import { GoDotFill } from "react-icons/go";
import { IoMdCheckmark } from "react-icons/io";
+import { useRecoilValue } from "recoil";
import styles from "./VoteContent.module.scss";
-import CandidateCard from "./CandidateCard/CandidateCard";
-import VoteContentEmpty from "./VoteContentEmpty/VoteContentEmpty";
+import { isCandidateSelectingState } from "@/recoil/vote/alertModal";
+
+import CandidateList from "./CandidateList/CandidateList";
import VoteRecommendList from "./VoteRecommendList/VoteRecommendList";
+import DeleteCandidatesButton from "../DeleteCandidatesButton/DeleteCandidatesButton";
import AddCandidate from "../VoteBottomSlideContent/AddCandidate/AddCandidate";
import { VoteContentProps } from "@/types/vote";
@@ -17,9 +20,7 @@ const VoteContent = ({
showResults,
}: VoteContentProps) => {
const candidates = data.candidates;
-
- //결과보기 클릭(showResults) 이후
- // 득표 순으로 재정렬
+ const isCandidateSelecting = useRecoilValue(isCandidateSelectingState);
// 결정완료 상태 -> stateBar 결정완료 / CTA버튼 삭제 / 추천슬라이드 후보추가->일정에담기
// 결정완료는... voteData에서
@@ -46,30 +47,16 @@ const VoteContent = ({
+ 후보 추가({candidates.length}/15)