added test api function that just returns a string thank you obama
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user