Skip to content

Commit

Permalink
Disable button after finalizing
Browse files Browse the repository at this point in the history
  • Loading branch information
bortoz committed Dec 7, 2024
1 parent fed823e commit 340a159
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/web/teacher/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ export default function TeacherTable() {
</Button>
)}
<FinalizeModal key={contest.id} ref={finalizeRef} />
<Button
className="btn-primary btn-sm h-10"
icon={Trash2}
onClick={() => deleterRef.current?.showModal()}>
<div className="hidden md:block">Svuota</div>
</Button>
{!participation.finalized && (
<Button
className="btn-primary btn-sm h-10"
icon={Trash2}
onClick={() => deleterRef.current?.showModal()}>
<div className="hidden md:block">Svuota</div>
</Button>
)}
</div>
<Suspense fallback={<Loading />}>
<Table key={participation.id} />
Expand Down

0 comments on commit 340a159

Please sign in to comment.