summaryrefslogtreecommitdiff
path: root/webapp/src/components/show_bid.rs
blob: 2ab2d5cee2cd95af40afb2366ba53cebdcdabd1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::bridge_engine::{Bidding, Contract};
use yew::prelude::*;

#[derive(PartialEq, Properties, Clone)]
pub struct ShowBidProps {
    pub contract: Option<Contract>,
    pub bidding: Bidding,
}

#[function_component(ShowBid)]
pub fn show_bid(props: &ShowBidProps) -> Html {
html! {
    <>
        <p>{
            match props.contract {
                None => "Passed".to_string(),
                Some(c) => format!("{}", c),
            }
        }</p>
    </>
}
}