mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
Fix issues with category text usage
This commit is contained in:
parent
3fde0401b2
commit
b957ed7f3a
@ -14,8 +14,7 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use reqwasm;
|
||||
//use serde::{Deserialize, Serialize};
|
||||
use serde_json::to_string;
|
||||
use serde_json::{from_str, to_string};
|
||||
use sycamore::prelude::*;
|
||||
use tracing::{debug, error, info, instrument, warn};
|
||||
|
||||
@ -149,7 +148,7 @@ impl HttpStore {
|
||||
Err(format!("Status: {}", resp.status()).into())
|
||||
} else {
|
||||
debug!("We got a valid response back!");
|
||||
let resp = resp.text().await;
|
||||
let resp = resp.json().await;
|
||||
Ok(Some(resp.map_err(|e| format!("{}", e))?))
|
||||
}
|
||||
}
|
||||
|
@ -95,10 +95,10 @@ pub fn Categories<G: Html>(cx: Scope) -> View<G> {
|
||||
view! {cx,
|
||||
(dialog_view)
|
||||
textarea(bind:value=category_text, rows=20)
|
||||
a(role="button", href="#", on:click=move |_| {
|
||||
span(role="button", on:click=move |_| {
|
||||
check_category_text_parses(category_text.get().as_str(), error_text);
|
||||
}) { "Check" } " "
|
||||
a(role="button", href="#", on:click=move |_| {
|
||||
span(role="button", on:click=move |_| {
|
||||
// TODO(jwall): check and then save the categories.
|
||||
if check_category_text_parses(category_text.get().as_str(), error_text) {
|
||||
debug!("triggering category save");
|
||||
|
Loading…
x
Reference in New Issue
Block a user