we successfully compiled and wen from auth state to login state and auth state
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user