Major early updates
This commit is contained in:
28
frontend/src/main.rs
Normal file
28
frontend/src/main.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
mod api;
|
||||
mod components;
|
||||
mod pages;
|
||||
mod types;
|
||||
|
||||
use yew::prelude::*;
|
||||
use yew_router::prelude::*;
|
||||
|
||||
use components::navbar::Navbar;
|
||||
use pages::{switch, Route};
|
||||
|
||||
#[function_component(App)]
|
||||
fn app() -> Html {
|
||||
html! {
|
||||
<BrowserRouter>
|
||||
<div class="app">
|
||||
<Navbar />
|
||||
<div class="main-content">
|
||||
<Switch<Route> render={switch} />
|
||||
</div>
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
yew::Renderer::<App>::new().render();
|
||||
}
|
||||
Reference in New Issue
Block a user