Skip to content

Commit

Permalink
refactor: Remove unnecessary if
Browse files Browse the repository at this point in the history
  • Loading branch information
lurgi committed Sep 23, 2024
1 parent 26b36d3 commit 512462d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions frontend/src/components/recruitment/CheckBoxField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ export default function CheckBoxField({ choices, setChoices }: Props) {
e.preventDefault();
if (index === choices.length - 1) {
addOption();
}
if (index !== choices.length - 1) {
} else {
inputRefs.current[index + 1]?.focus();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ export default function RadioInputField({ choices, setChoices }: Props) {
e.preventDefault();
if (index === choices.length - 1) {
addOption();
}
if (index !== choices.length - 1) {
} else {
inputRefs.current[index + 1]?.focus();
}
}
Expand Down

0 comments on commit 512462d

Please sign in to comment.