use rooms::RoomList; use rooms::YewduxRoomList; use wasm_bindgen::prelude::*; use yew::prelude::*; use yew_router::prelude::*; use yewdux::prelude::*; pub mod api; pub mod error; pub mod grpc; pub mod rooms; pub mod state; #[derive(Routable, PartialEq, Clone, Debug)] pub enum AppRoute { #[at("/rooms")] Rooms, #[at("/rooms/{room_id}")] Room { room_id: String }, #[at("/")] Index, } type AppRouter = Router; type AppAnchor = Link; //For rendering clickable links. fn render_route(routes: &AppRoute) -> Html { match routes { AppRoute::Rooms => { html! { } } AppRoute::Room { room_id } => { html! {
{"This is the specifi roompage."}
} } AppRoute::Index => { html! { } } } } // struct AppMenu; // impl Component for AppMenu { // type Message = (); // type Properties = (); // fn create(_: Self::Properties, _link: ComponentLink) -> Self { // Self // } // fn update(&mut self, _msg: Self::Message) -> ShouldRender { // false // } // fn change(&mut self, _: Self::Properties) -> ShouldRender { // false // } // fn view(&self) -> Html { // html! { //
    //
  • // {"Home"} //
  • //
  • // {"Oaths"} //
  • //
  • // {"Commitments"} //
  • //
  • // {"Studies"} //
  • //
  • // {"Runic Divination"} //
  • //
// } // } // } struct App; impl Component for App { type Message = (); type Properties = (); fn create(_: Self::Properties, _link: ComponentLink) -> Self { Self } fn update(&mut self, _: Self::Message) -> ShouldRender { false } fn change(&mut self, _: Self::Properties) -> ShouldRender { false } fn view(&self) -> Html { html! {
} } } #[wasm_bindgen(start)] pub fn run_app() { yew::start_app::(); }