mod.rs
448 Bytes
mod logic;
pub(crate) mod upload;
mod view;
use mogwai::prelude::*;
use self::{view::upload_view, logic::upload_logic};
pub(crate) async fn new() -> Component<Dom> {
let (tx_logic, rx_logic) = broadcast::bounded(1);
let (tx_previews, rx_previews) = mpmc::bounded(1);
let view = upload_view(tx_logic.clone(), rx_previews);
let logic = upload_logic(rx_logic, tx_logic, tx_previews);
Component::from(view).with_logic(logic)
}