mentorenwahl/frontend/src/routes/not_found.rs

33 lines
726 B
Rust

use yew::prelude::*;
use yew_side_effect::title::Title;
use crate::layouts;
#[derive(Properties, PartialEq)]
pub struct NotFoundProps {
pub token: Option<String>,
pub logged_in: bool,
}
pub struct NotFound;
impl Component for NotFound {
type Message = ();
type Properties = NotFoundProps;
fn create(_ctx: &Context<Self>) -> Self {
Self
}
fn view(&self, ctx: &Context<Self>) -> Html {
html! {
<>
<Title value="404 Not found" />
<layouts::main::Main token={ctx.props().token.to_owned()} logged_in={ctx.props().logged_in}>
<h1>{ "404" }</h1>
</layouts::main::Main>
</>
}
}
}