From 9f9ce406ea3b363067a68e54d958fbaf6c3d5af2 Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Mon, 26 Aug 2024 02:37:09 -0400 Subject: [PATCH] start rewriting game component --- client/src/components/cards.rs | 6 +- client/src/components/game.rs | 350 ++++++++++------------- client/src/components/game/header.rs | 14 + client/src/components/game/meta.rs | 17 ++ client/src/components/game/scoreboard.rs | 31 ++ client/src/components/game_old.rs | 211 ++++++++++++++ client/src/components/mod.rs | 2 +- lib/src/lib.rs | 2 +- 8 files changed, 434 insertions(+), 199 deletions(-) create mode 100644 client/src/components/game/header.rs create mode 100644 client/src/components/game/meta.rs create mode 100644 client/src/components/game/scoreboard.rs create mode 100644 client/src/components/game_old.rs diff --git a/client/src/components/cards.rs b/client/src/components/cards.rs index 7aaf1d3..266dd6d 100644 --- a/client/src/components/cards.rs +++ b/client/src/components/cards.rs @@ -2,11 +2,11 @@ use leptos::*; use lib::WhiteCardMeta; #[component] -pub fn BlackCard(card_data: ReadSignal<(String, u8)>) -> impl IntoView { +pub fn BlackCard(card_data: (String, u8)) -> impl IntoView { view! {
{move || card_data().0}
-Pick: {move || card_data().1}
+{card_data.0}
+Pick: {card_data.1}
Name: {move || game_name()}
-Host: {move || game_host()}
-Czar: {move || game_czar()}
-White Deck: {move || game_white_count().to_string()}
-White Discard: {move || game_white_discard_count().to_string()}
-Black Deck: {move || game_black_count().to_string()}
- - -Players:
-Name | -Score | -
---|---|
{&player.name} | -- {&player.score.to_string()} - | -
Name | +Score | +
---|---|
{&player.name} | +{&player.score.to_string()} | +