wal_core/router/
not_found_component.rs

1use crate::{
2    component::{behavior::Behavior, Component},
3    virtual_dom::{VNode, VText},
4};
5
6pub(crate) struct NotFoundComponent;
7impl Default for NotFoundComponent {
8    fn default() -> Self {
9        Self::new(())
10    }
11}
12impl Component for NotFoundComponent {
13    type Message = ();
14    type Properties = ();
15    fn new(_props: Self::Properties) -> Self {
16        NotFoundComponent
17    }
18
19    fn view(&self, _behavior: &mut impl Behavior<Self>) -> VNode {
20        VText::new("Page was not found").into()
21    }
22
23    fn update(&mut self, _message: Self::Message) -> bool {
24        false
25    }
26}