A bit of clean up
This commit is contained in:
parent
cb2483eab1
commit
a590d7e1e9
24 changed files with 259 additions and 237 deletions
|
|
@ -16,17 +16,13 @@ use web_sys::{
|
|||
use crate::{
|
||||
modal_dialog, request,
|
||||
toast::{self, Level},
|
||||
utils::{by_id, selector, selector_and_clone, SelectorExt},
|
||||
utils::{SelectorExt, by_id, selector, selector_and_clone},
|
||||
};
|
||||
|
||||
pub fn setup_page(recipe_id: i64) -> Result<(), JsValue> {
|
||||
pub fn setup_page(recipe_id: i64) {
|
||||
// Title.
|
||||
{
|
||||
let Some(title) = document().get_element_by_id("input-title") else {
|
||||
return Err(JsValue::from_str("Unable to find 'input-title' element"));
|
||||
};
|
||||
|
||||
let title: HtmlInputElement = title.dyn_into().unwrap();
|
||||
let title: HtmlInputElement = by_id("input-title");
|
||||
|
||||
// Check if the recipe has been loaded.
|
||||
|
||||
|
|
@ -315,8 +311,6 @@ pub fn setup_page(recipe_id: i64) -> Result<(), JsValue> {
|
|||
})
|
||||
.forget();
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn create_group_element(group: &ron_api::Group) -> Element {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue