diff options
Diffstat (limited to 'webapp/src/components/tricks_played.rs')
-rw-r--r-- | webapp/src/components/tricks_played.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/webapp/src/components/tricks_played.rs b/webapp/src/components/tricks_played.rs new file mode 100644 index 0000000..352a030 --- /dev/null +++ b/webapp/src/components/tricks_played.rs @@ -0,0 +1,16 @@ +use yew::prelude::*; +use crate::bridge_engine::Trick; + +#[function_component(TricksPlayed)] +pub fn tricks_played(props: &TricksPlayedProperties) -> Html { + html! { + <> + <p>{ format!("{} tricks played", props.tricks.len()) }</p> + </> + } +} + +#[derive(PartialEq, Properties, Clone)] +pub struct TricksPlayedProperties { + pub tricks: Vec<Trick>, +} |