minor changes
This commit is contained in:
50
src/App.js
50
src/App.js
@@ -591,6 +591,31 @@ function App() {
|
||||
setFocusedStoreId(storeId);
|
||||
};
|
||||
|
||||
const userLocationWithLabel = useMemo(() => {
|
||||
if (!preferences?.location) {
|
||||
return null;
|
||||
}
|
||||
const label = inferLocationLabel(preferences.location, stores);
|
||||
return label ? { ...preferences.location, label } : { ...preferences.location };
|
||||
}, [preferences?.location, stores]);
|
||||
|
||||
const sharedNotificationProps = {
|
||||
error: notificationError,
|
||||
message: notificationMessage,
|
||||
settings: notificationSettings,
|
||||
capabilities: notificationCapabilities,
|
||||
loading: notificationLoading,
|
||||
dirty: notificationDirty,
|
||||
saving: notificationSaving,
|
||||
onReset: loadNotificationSettings,
|
||||
onSave: saveNotificationSettings,
|
||||
onFieldChange: handleNotificationFieldChange,
|
||||
onSendTest: sendNotificationTest,
|
||||
onCopyLink: copyToClipboard,
|
||||
copyFeedback,
|
||||
ntfyPreviewUrl
|
||||
};
|
||||
|
||||
if (!session?.token) {
|
||||
return (
|
||||
<>
|
||||
@@ -635,31 +660,6 @@ function App() {
|
||||
);
|
||||
}
|
||||
|
||||
const userLocationWithLabel = useMemo(() => {
|
||||
if (!preferences?.location) {
|
||||
return null;
|
||||
}
|
||||
const label = inferLocationLabel(preferences.location, stores);
|
||||
return label ? { ...preferences.location, label } : { ...preferences.location };
|
||||
}, [preferences?.location, stores]);
|
||||
|
||||
const sharedNotificationProps = {
|
||||
error: notificationError,
|
||||
message: notificationMessage,
|
||||
settings: notificationSettings,
|
||||
capabilities: notificationCapabilities,
|
||||
loading: notificationLoading,
|
||||
dirty: notificationDirty,
|
||||
saving: notificationSaving,
|
||||
onReset: loadNotificationSettings,
|
||||
onSave: saveNotificationSettings,
|
||||
onFieldChange: handleNotificationFieldChange,
|
||||
onSendTest: sendNotificationTest,
|
||||
onCopyLink: copyToClipboard,
|
||||
copyFeedback,
|
||||
ntfyPreviewUrl
|
||||
};
|
||||
|
||||
const dashboardContent = (
|
||||
<DashboardView
|
||||
session={session}
|
||||
|
||||
Reference in New Issue
Block a user