Added toast function for creating toast notifications #9
@ -1,3 +1,4 @@
|
||||
use crate::util;
|
||||
use leptos::*;
|
||||
use leptos_use::{core::ConnectionReadyState, use_websocket, UseWebsocketReturn};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -158,6 +159,11 @@ fn surrealdb_response(response: String) {
|
||||
|
||||
/// Function to execute when DB signin is succesful
|
||||
fn use_surrealdb(_response: SurrealResponse) {
|
||||
util::toast::add_toast(
|
||||
"Succesfully signed into DB".to_string(),
|
||||
"success".to_string(),
|
||||
);
|
||||
|
||||
let websocket = expect_context::<SurrealContext>();
|
||||
|
||||
websocket.set_authenticated.set(true);
|
||||
|
Loading…
Reference in New Issue
Block a user