Skip to content

Commit

Permalink
Add planned state handling in Overview component
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanGrims committed Dec 7, 2024
1 parent 9f9b046 commit 184dc2d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/admin/Overview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export default function Overview() {
const isActive =
vote.active && endTime.isAfter(now) && startTime.isBefore(now);

const isPlanned = startTime.isAfter(now);

return (
<mdui-card
key={vote.id}
Expand All @@ -66,7 +68,13 @@ export default function Overview() {
<p>
<mdui-icon
style={{ fontSize: "50px" }}
name={isActive ? "event_available" : "done_all"}
name={
isActive
? "event_available"
: isPlanned
? "schedule"
: "done_all"
}
></mdui-icon>
</p>
</mdui-card>
Expand All @@ -84,15 +92,6 @@ export default function Overview() {
</p>
</mdui-card>
</div>
{/* <mdui-fab
icon="add"
onClick={() => navigate("/admin/new")}
style={{ position: "fixed", bottom: "20px", right: "20px" }}
extended
variant="surface"
>
Neue Wahl
</mdui-fab> */}
</div>
);
}
Expand Down

0 comments on commit 184dc2d

Please sign in to comment.