🏗️ Remove data handling from components
The data sent by matrix_interface senders is now handled by the App.
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user