diff --git a/client/src/ui/handlers/render.rs b/client/src/ui/handlers/render.rs index 052cadc..d84aceb 100644 --- a/client/src/ui/handlers/render.rs +++ b/client/src/ui/handlers/render.rs @@ -43,6 +43,14 @@ pub fn render_ui( if app_state.ui.show_intro { intro_state.render(f, main_content_area, theme); } else if app_state.ui.show_admin { + // Create a temporary AdminPanelState using app_state data + let mut admin_panel_state = AdminPanelState::new(app_state.admin_profiles.clone()); + + // Set the selected item + if !app_state.admin_profiles.is_empty() { + admin_panel_state.list_state.select(Some(app_state.admin_selected_item)); + } + admin_panel_state.render( f, main_content_area,