Add translations for "Loading place details…" and improve place search functionality

- Integrate a loading spinner for "Name" input field during place search.
- Enhance OpenStreetMap place detail retrieval with Nominatim lookup.
- Update `authStore` to track Google Maps API key presence.
This commit is contained in:
Ben Haas
2026-04-13 08:28:34 -07:00
parent 7fca16d866
commit 1a51f8e3e1
17 changed files with 78 additions and 12 deletions
+4
View File
@@ -178,6 +178,7 @@ export const useAuthStore = create<AuthState>((set, get) => ({
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'))
@@ -188,6 +189,9 @@ export const useAuthStore = create<AuthState>((set, get) => ({
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'))
}