minor changes
This commit is contained in:
12
src/App.js
12
src/App.js
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user