dialtone_yew 0.1.0

Dialtone Yew Webapp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use yew::prelude::*;
use yew_router::Routable;

pub mod index;

use index::*;

#[derive(Clone, Routable, PartialEq)]
pub enum AccountRoute {
    #[at("/account/index/:acct")]
    Index { acct: String },
}

pub fn account_switch(routes: &AccountRoute) -> Html {
    match routes {
        AccountRoute::Index { acct } => html! { <Account acct={acct.clone()}/> },
    }
}