From 6098b7460b07df5d1b6f0941f7e4e7055735d310 Mon Sep 17 00:00:00 2001 From: xeovalyte Date: Tue, 12 Mar 2024 15:51:23 +0100 Subject: [PATCH] Added a toast notification for DB sigin --- application/src/util/surrealdb.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/src/util/surrealdb.rs b/application/src/util/surrealdb.rs index 9b09337..a4bfa18 100644 --- a/application/src/util/surrealdb.rs +++ b/application/src/util/surrealdb.rs @@ -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::(); websocket.set_authenticated.set(true);