added test api function that just returns a string thank you obama

This commit is contained in:
LinlyBoi
2022-12-24 21:29:20 +02:00
parent d012926261
commit 87d96d938f
6 changed files with 724 additions and 4 deletions

View File

@@ -154,3 +154,7 @@ async fn fetch_driver(url: &'static str) -> Result<String, FetchError> {
let text = JsFuture::from(resp.text()?).await?;
Ok(text.as_string().unwrap())
}
//render obama
pub fn render_driver() {
yew::Renderer::<Driver>::new().render();
}

View File

@@ -1,6 +1,4 @@
mod fetching;
use common::CommonDriver;
use gloo_net::http::Request;
use yew::prelude::*;
#[function_component]
@@ -67,5 +65,5 @@ struct Stdnt {
// }
fn main() {
yew::Renderer::<App>::new().render();
fetching::render_driver();
}