fix being able to submit 0 cards when judging and locking up the game

This commit is contained in:
Adam 2024-12-03 19:52:47 -05:00
parent 8cb04a4eb3
commit 0d1d1bf602

View file

@ -67,6 +67,7 @@ pub fn JudgingView() -> impl IntoView {
// Judging Submit Handler
let submit_judge = move |_| {
if !selected_cards().is_empty() {
let msg = to_string(&JudgeDecisionRequest {
game_id: game_meta().unwrap().uuid.clone(),
winning_cards: selected_cards()
@ -82,6 +83,7 @@ pub fn JudgingView() -> impl IntoView {
});
set_judge_round(None);
}
};
view! {