diff --git a/frontend/src/fetching.rs b/frontend/src/fetching.rs index 117a500..a827e6e 100644 --- a/frontend/src/fetching.rs +++ b/frontend/src/fetching.rs @@ -121,14 +121,15 @@ impl Component for RandomCommit { } //Generate Struct and implement component for driver using CommonDriver struct Driver { - driver: FetchState, + driver: FetchState, } +//implement the component for Driver using a string impl Component for Driver { - type Message = Msg; + type Message = Msg; type Properties = (); fn create(_ctx: &Context) -> Self { Self { - driver: FetchState::NotFetching, //Default state is not fetching anything + driver: FetchState::NotFetching, } } @@ -164,12 +165,11 @@ impl Component for Driver { } fn view(&self, ctx: &Context) -> Html { - //render the component into HTML match &self.driver { FetchState::NotFetching => html! { <>