🏗️ Remove data handling from components

The data sent by matrix_interface senders is now handled by the App.
This commit is contained in:
2023-12-21 22:07:08 +01:00
parent 513b05ddb3
commit c9292fd613
7 changed files with 177 additions and 71 deletions

View File

@@ -2,15 +2,15 @@ use dioxus::prelude::*;
use fermi::*;
use tracing::debug;
use crate::base::APP_SETTINGS;
use crate::base::SESSION;
use crate::components::contacts_window::contacts_window::ContactsWindow;
use crate::components::login::Login;
pub fn MainWindow(cx: Scope) -> Element {
debug!("MainWindow rendering");
let app_settings = use_atom_ref(cx, &APP_SETTINGS);
let is_logged = app_settings.read().store.is_logged;
let session_ref = use_atom_ref(cx, &SESSION);
let is_logged = session_ref.read().is_logged;
cx.render(rsx! {
if is_logged {