moving state out of ui

This commit is contained in:
filipriec
2025-02-25 23:36:53 +01:00
parent 5010b73bab
commit fef821c800
6 changed files with 6 additions and 11 deletions

View File

@@ -2,6 +2,7 @@
pub mod ui;
pub mod tui;
pub mod config;
pub mod state;
pub mod components1;
pub use ui::run_ui;

View File

@@ -1,9 +0,0 @@
// src/client/mod.rs
mod ui;
mod colors;
mod components1;
mod terminal;
mod config;
pub use config::Config;
pub use ui::run_ui;

2
client/src/state/mod.rs Normal file
View File

@@ -0,0 +1,2 @@
// src/state/mod.rs
pub mod state;

View File

@@ -4,6 +4,5 @@ pub mod ui;
pub mod form;
pub mod event;
pub mod render;
pub mod state;
pub use ui::run_ui;

View File

@@ -3,7 +3,9 @@
use crate::tui::terminal::AppTerminal;
use crate::config::colors::Theme;
use crate::config::config::Config;
use crate::ui::handlers::{event::EventHandler, form::FormState, state::AppState, render::render_ui};
use crate::ui::handlers::{event::EventHandler, form::FormState, render::render_ui};
use crate::state::state::AppState;
pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
let config = Config::load()?;