Clear local storage on selection (#795)

This commit is contained in:
Chris 2026-01-23 23:54:04 +02:00 committed by GitHub
parent bdc33d3113
commit 0d27d96467
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,7 +58,13 @@ export const updateProfile = async (
body: JSON.stringify(profileData),
});
await handleAuthResponse(response, 'Failed to update profile.');
return await response.json();
const updatedProfile = await response.json();
if ('task_intelligence_enabled' in profileData) {
localStorage.removeItem('taskIntelligenceEnabled');
}
return updatedProfile;
};
export const fetchSchedulerStatus = async (): Promise<SchedulerStatus> => {