Skip to content

Commit

Permalink
fix(vote): ensure selectCount comparison is numeric for button enable…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
JohanGrims committed Nov 15, 2024
1 parent e0ba7a2 commit 41ba7d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/admin/vote/Assign.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export default function Assign() {
variant="filled"
style={{ width: "100%", padding: "20px" }}
clickable
disabled={vote.selectCount !== "3"}
disabled={Number(vote.selectCount) !== 3}
onClick={fetchOptimization}
>
<div
Expand All @@ -314,7 +314,9 @@ export default function Assign() {
<h2>Automatische Optimierung</h2>
<mdui-icon name="auto_awesome"></mdui-icon>
</div>
{vote.selectCount !== "3" && <b>Nur bei 3 Wahlen verfügbar — </b>}
{Number(vote.selectCount) !== 3 && (
<b>Nur bei 3 Wahlen verfügbar — </b>
)}
Diese Funktion ordnet die Schüler bestmöglich den Projekten zu. Es
ist möglich, erzeugte Ergebnisse zu ändern.
</div>
Expand Down

0 comments on commit 41ba7d3

Please sign in to comment.