login logic in the components
This commit is contained in:
@@ -8,6 +8,7 @@ use crate::components::{
|
||||
form::form::render_form,
|
||||
intro::{intro},
|
||||
admin::{admin_panel::AdminPanelState},
|
||||
auth::login::render_login,
|
||||
};
|
||||
use crate::config::colors::themes::Theme;
|
||||
use ratatui::layout::{Constraint, Direction, Layout};
|
||||
@@ -47,7 +48,7 @@ pub fn render_ui(
|
||||
// Use app_state's intro_state directly
|
||||
app_state.ui.intro_state.render(f, main_content_area, theme);
|
||||
}else if app_state.ui.show_login {
|
||||
auth_state.render(f, main_content_area, theme);
|
||||
render_login(f, main_content_area, theme, auth_state);
|
||||
} else if app_state.ui.show_admin {
|
||||
// Create temporary AdminPanelState for rendering
|
||||
let mut admin_state = AdminPanelState::new(
|
||||
|
||||
Reference in New Issue
Block a user