@@ -147,11 +155,8 @@ console.log(test);
diff --git a/components/form/CandidatesField.jsx b/components/form/CandidatesField.jsx
index 07c577c..d49043a 100644
--- a/components/form/CandidatesField.jsx
+++ b/components/form/CandidatesField.jsx
@@ -73,14 +73,14 @@ const CandidatesField = ({onChange}) => {
const handleKeyPress = (e, index) => {
if (e.key === "Enter") {
e.preventDefault();
- if (index + 1 === candidates.length) {
+ if (index + 2 === candidates.length) {
addCandidate();
}
else {
- candidates[index + 1].fieldRef.current.focus();
- }
+
+ }candidates[index + 1].fieldRef.current.focus();
}
-
+
}
const onSortEnd = ({oldIndex, newIndex}) => {
diff --git a/components/form/ConfirmModal.jsx b/components/form/ConfirmModal.jsx
index 3d81fd7..badcffa 100644
--- a/components/form/ConfirmModal.jsx
+++ b/components/form/ConfirmModal.jsx
@@ -114,14 +114,19 @@ const ConfirmModal = ({ CreateElection, handleRestrictResultCheck, handleIsTimeL