use std::rc::Rc; use api::{ AddRecipeIngredientRequest, IngredientInfo, RecipeEditPersonCount, RecipeEditRating, RecipeEditStepsRequest, RecipeInfo, RecipeIngredientEditRequest, RecipeRenameRequest, }; use itertools::Itertools; use uuid::Uuid; use wasm_bindgen::JsCast; use web_sys::{HtmlInputElement, HtmlTextAreaElement}; use yew::{ prelude::*, suspense::{use_future, use_future_with_deps}, }; use yew_router::prelude::*; use crate::{ api, bootstrap::{bs, ConfirmDangerModal, FormModal, ModalToggleButton}, recipe_creator::IngredientSelectBase, RegaladeGlobalState, Route, }; #[derive(Debug, Clone, PartialEq, Properties)] struct RecipeRatingProps { rating: u8, } #[function_component] fn RecipeRating(props: &RecipeRatingProps) -> Html { let rating = (props.rating + 1).min(3); html! { { for (0..rating).map(|_| html!{