minor changes

This commit is contained in:
2025-11-10 21:54:23 +01:00
parent f4a79a6bc4
commit 545074a3b8
3 changed files with 33 additions and 21 deletions

View File

@@ -595,8 +595,16 @@ function App() {
if (!preferences?.location) {
return null;
}
const label = inferLocationLabel(preferences.location, stores);
return label ? { ...preferences.location, label } : { ...preferences.location };
const info = inferLocationLabel(preferences.location, stores);
if (!info) {
return { ...preferences.location };
}
return {
...preferences.location,
label: info.label,
labelDistanceKm: info.distanceKm,
labelWithinRange: info.withinRange !== false
};
}, [preferences?.location, stores]);
const sharedNotificationProps = {