#![allow(non_snake_case)] use yew::prelude::*; use yewdux::prelude::*; use crate::data::{plate_instances::PlateInstance, transfer::Transfer}; use crate::data::plate::*; use crate::components::states::MainState; #[derive(PartialEq, Properties)] pub struct TreeProps { pub open_new_plate_callback: Callback<()>, } #[function_component] pub fn Tree(props: &TreeProps) -> Html { let (state, dispatch) = use_store::(); let source_plates = state.source_plates.iter() .map(|spi| { html!{
  • {String::from(spi)}
  • } }).collect::(); let dest_plates = state.destination_plates.iter() .map(|spi| { html!{
  • {String::from(spi)}
  • } }).collect::(); html! {

    {"Source Plates:"}

      {source_plates}

    {"Destination Plates:"}

      {dest_plates}

    {"Transfers:"}

    // Temporary
    } }