diff options
| -rw-r--r-- | src/components/Content.tsx | 8 | ||||
| -rw-r--r-- | src/components/ProfileManagement.tsx | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/components/Content.tsx b/src/components/Content.tsx index d823257..7815951 100644 --- a/src/components/Content.tsx +++ b/src/components/Content.tsx @@ -33,7 +33,8 @@ export function Content() { const { currentProfile, - updateProfileConfig + updateProfileConfig, + loadProfiles } = useProfileManagement(); const { isInstalling, isUninstalling, handleInstall, handleUninstall } = useInstallationActions(); @@ -96,7 +97,10 @@ export function Content() { {isInstalled && ( <ProfileManagement currentProfile={currentProfile} - onProfileChange={() => loadLsfgConfig()} + onProfileChange={async () => { + await loadProfiles(); + await loadLsfgConfig(); + }} /> )} diff --git a/src/components/ProfileManagement.tsx b/src/components/ProfileManagement.tsx index a499836..83b5fa4 100644 --- a/src/components/ProfileManagement.tsx +++ b/src/components/ProfileManagement.tsx @@ -163,6 +163,8 @@ export function ProfileManagement({ currentProfile, onProfileChange }: ProfileMa if (result.success) { showSuccessToast("Profile created", `Created profile: ${profileName}`); await loadProfiles(); + // Automatically switch to the newly created profile + await handleProfileChange(profileName); } else { console.error("Failed to create profile:", result.error); showErrorToast("Failed to create profile", result.error || "Unknown error"); |
