From 376332d9891aca42fde63f559b59199f97f448e4 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 29 Aug 2026 16:36:07 +0200 Subject: [PATCH] fix(mobile): the phone admin map preview needs the CARTO key too The fourth preview with the same shape, missed when the other three were fixed. Sonar pointed at it: the desktop and phone admin pages are near-identical, so the duplication report named the file the change had not reached. --- .../src/mobile/screens/admin/MAdminDefaultUserSettings.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/mobile/screens/admin/MAdminDefaultUserSettings.tsx b/client/src/mobile/screens/admin/MAdminDefaultUserSettings.tsx index 7b089d00a..86fbb9650 100644 --- a/client/src/mobile/screens/admin/MAdminDefaultUserSettings.tsx +++ b/client/src/mobile/screens/admin/MAdminDefaultUserSettings.tsx @@ -6,7 +6,7 @@ import { useToast } from '../../../components/shared/Toast' import { MapView } from '../../../components/Map/MapView' import { SYMBOLS, currenciesWith } from '../../../components/Budget/BudgetPanel.constants' import { getApiErrorMessage, type DistanceUnit, type Place } from '../../../types' -import { normalizeTileUrl } from '../../../utils/tileUrl' +import { normalizeTileUrl, withTileApiKey } from '../../../utils/tileUrl' import { MAPBOX_DEFAULT_STYLE, defaultStyleForProvider, @@ -331,7 +331,9 @@ export default function MAdminDefaultUserSettings(): React.ReactElement { onMapContextMenu: null, center: [48.8566, 2.3522], zoom: 10, - tileUrl: mapTileUrl, + // As on the other three previews: the field holds what is being + // edited, so the key goes back on before the template resolves. + tileUrl: withTileApiKey(mapTileUrl, cartoKey), fitKey: null, dayOrderMap: [], leftWidth: 0,