diff --git a/src/wasm/main.rs b/src/wasm/main.rs index 67bc969..d0fee4c 100644 --- a/src/wasm/main.rs +++ b/src/wasm/main.rs @@ -1,5 +1,6 @@ #![cfg(feature = "wasm")] use yew::prelude::*; +use yew::virtual_dom::VNode; use cega::wasm::image::*; use cega::wasm::{FileInput, FileUpload}; @@ -9,7 +10,7 @@ pub enum Msg { } pub struct App { - files: Vec, + images: Vec, } impl Component for App { @@ -18,14 +19,14 @@ impl Component for App { fn create(_ctx: &Context) -> Self { Self { - files: Vec::default(), + images: Vec::default(), } } fn update(&mut self, _ctx: &Context, msg: Self::Message) -> bool { match msg { Msg::Loaded(file) => { - self.files.push(file); + self.images.push(html! { }); } } true @@ -37,9 +38,7 @@ impl Component for App {

{ "Process your CGA/EGAs" }

- {for self.files.iter().map(|f| - html! { } - )} + {{ self.images.clone() }}
}