From 241f1523479469c654eb349b9d3c66fc1cf36610 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 29 Aug 2026 15:47:07 +0200 Subject: [PATCH] fix(admin): put the CARTO key back on the default-settings map preview too Same shape as the user-facing map tab, and reported alongside it: the field holds what the admin is editing, so the preview resolved a keyless CARTO template and drew the app default instead of the basemap being set. --- client/src/components/Admin/DefaultUserSettingsTab.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/components/Admin/DefaultUserSettingsTab.tsx b/client/src/components/Admin/DefaultUserSettingsTab.tsx index 9b705726b..2f07419ff 100644 --- a/client/src/components/Admin/DefaultUserSettingsTab.tsx +++ b/client/src/components/Admin/DefaultUserSettingsTab.tsx @@ -8,7 +8,7 @@ import CustomSelect from '../shared/CustomSelect' import { MapView } from '../Map/MapView' import { SYMBOLS, currenciesWith } from '../Budget/BudgetPanel.constants' import type { DistanceUnit, Place } from '../../types' -import { normalizeTileUrl } from '../../utils/tileUrl' +import { normalizeTileUrl, withTileApiKey } from '../../utils/tileUrl' import { MAPBOX_DEFAULT_STYLE, defaultStyleForProvider, @@ -378,7 +378,9 @@ export default function DefaultUserSettingsTab(): React.ReactElement { onMapContextMenu: null, center: [48.8566, 2.3522], zoom: 10, - tileUrl: mapTileUrl, + // Same as the user-facing map tab: the field holds what is being + // edited, so the key goes back on before the preview resolves it. + tileUrl: withTileApiKey(mapTileUrl, cartoKey), fitKey: null, dayOrderMap: [], leftWidth: 0,