we successfully compiled and wen from auth state to login state and auth state

This commit is contained in:
filipriec
2025-04-13 17:47:00 +02:00
parent 1dd5f685a6
commit 3d0a9f2082
14 changed files with 120 additions and 114 deletions

View File

@@ -2,7 +2,7 @@
use crate::{
config::colors::themes::Theme,
state::pages::auth::AuthState,
state::pages::auth::LoginState,
components::common::dialog,
state::state::AppState,
};
@@ -17,7 +17,7 @@ pub fn render_login(
f: &mut Frame,
area: Rect,
theme: &Theme,
state: &AuthState,
login_state: &LoginState,
app_state: &AppState,
is_edit_mode: bool,
) {
@@ -50,16 +50,16 @@ pub fn render_login(
crate::components::handlers::canvas::render_canvas(
f,
chunks[0],
state,
login_state,
&["Username/Email", "Password"],
&state.current_field,
&[&state.username, &state.password],
&login_state.current_field,
&[&login_state.username, &login_state.password],
theme,
is_edit_mode,
);
// --- ERROR MESSAGE ---
if let Some(err) = &state.error_message {
if let Some(err) = &login_state.error_message {
f.render_widget(
Paragraph::new(err.as_str())
.style(Style::default().fg(Color::Red))