clean up logging
This commit is contained in:
parent
a163a91a83
commit
050e606b2a
5 changed files with 3 additions and 17 deletions
|
@ -24,7 +24,6 @@ pub fn Auth() -> impl IntoView {
|
|||
let send_login = move |_| {
|
||||
if let Some(input) = username_input_ref.get() {
|
||||
if input.value() != String::from("") {
|
||||
logging::log!("send");
|
||||
websocket.send(
|
||||
&to_string(&UserLogInRequest {
|
||||
username: input.value(),
|
||||
|
|
|
@ -66,9 +66,6 @@ pub fn Browser() -> impl IntoView {
|
|||
.cloned()
|
||||
.map(|game| {
|
||||
view! {
|
||||
{
|
||||
logging::log!("I ran");
|
||||
}
|
||||
<tr>
|
||||
<td class="text-center border-b">{game.name}</td>
|
||||
<td class="text-center border-b">{game.host}</td>
|
||||
|
|
|
@ -44,9 +44,9 @@ pub fn CreateGame() -> impl IntoView {
|
|||
let request_new_game = move |_| {
|
||||
if let Some(input) = new_game_name_ref.get() {
|
||||
if input.value() == *"" {
|
||||
logging::log!("New game name is empty!");
|
||||
logging::error!("New game name is empty!");
|
||||
} else if selected_packs().is_empty() {
|
||||
logging::log!("New game selected packs is empty!");
|
||||
logging::error!("New game selected packs is empty!");
|
||||
} else {
|
||||
set_websocket_send(
|
||||
to_string(&NewGameRequest {
|
||||
|
@ -104,13 +104,11 @@ pub fn CreateGame() -> impl IntoView {
|
|||
checked
|
||||
on:change=move |e| {
|
||||
if event_target_checked(&e) {
|
||||
logging::log!("insert");
|
||||
set_selected_packs
|
||||
.update(|packs| {
|
||||
packs.insert(n.pack);
|
||||
})
|
||||
} else {
|
||||
logging::log!("remove");
|
||||
set_selected_packs
|
||||
.update(|packs| {
|
||||
packs.remove(&n.pack);
|
||||
|
@ -148,13 +146,11 @@ pub fn CreateGame() -> impl IntoView {
|
|||
id=n.pack
|
||||
on:change=move |e| {
|
||||
if event_target_checked(&e) {
|
||||
logging::log!("insert");
|
||||
set_selected_packs
|
||||
.update(|packs| {
|
||||
packs.insert(n.pack);
|
||||
})
|
||||
} else {
|
||||
logging::log!("remove");
|
||||
set_selected_packs
|
||||
.update(|packs| {
|
||||
packs.remove(&n.pack);
|
||||
|
|
|
@ -59,12 +59,6 @@ pub fn PlayingView() -> impl IntoView {
|
|||
} else if selected_cards.get_untracked().contains(clicked_card)
|
||||
&& !submitted_cards.get_untracked().contains(clicked_card)
|
||||
{
|
||||
logging::log!(
|
||||
"{:#?}\n{:#?}\n{:#?}",
|
||||
clicked_card,
|
||||
selected_cards(),
|
||||
submitted_cards()
|
||||
);
|
||||
set_selected_cards.update(|cards| {
|
||||
cards.remove(cards.iter().position(|card| card == clicked_card).unwrap());
|
||||
})
|
||||
|
|
|
@ -122,7 +122,7 @@ pub fn Websocket() -> impl IntoView {
|
|||
} else if let Ok(judge_update) = from_str::<JudgeRound>(message) {
|
||||
set_judge_round(Some(judge_update));
|
||||
} else {
|
||||
logging::log!("Unhandled message: {:#?}", message);
|
||||
logging::error!("Unhandled message: {:#?}", message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue