Merge branch 'review/pr-542' into feat/search-autocomplete

This commit is contained in:
jubnl
2026-04-15 04:02:08 +02:00
24 changed files with 765 additions and 41 deletions
+4
View File
@@ -194,6 +194,7 @@ export const useAuthStore = create<AuthState>()(
await authApi.updateMapsKey(key)
set((state) => ({
user: state.user ? { ...state.user, maps_api_key: key || null } : null,
hasMapsKey: !!key,
}))
} catch (err: unknown) {
throw new Error(getApiErrorMessage(err, 'Error saving API key'))
@@ -204,6 +205,9 @@ export const useAuthStore = create<AuthState>()(
try {
const data = await authApi.updateApiKeys(keys)
set({ user: data.user })
if ('maps_api_key' in keys) {
set({ hasMapsKey: !!keys.maps_api_key })
}
} catch (err: unknown) {
throw new Error(getApiErrorMessage(err, 'Error saving API keys'))
}