use yew::prelude::*; use yew_router::prelude::*; use crate::use_app_context; #[function_component(Table)] pub fn table(props: &TableProps) -> Html { let ctx = use_app_context(); let history = use_history().unwrap(); let leave_table = { let ctx = ctx.clone(); Callback::from(move |_| { ctx.leave_table(); }) }; html! { <>

{ format!("This is table {}", props.table.id) }

} } #[derive(PartialEq, Properties, Clone)] pub struct TableProps { pub table: protocol::Table, }