minor changes
This commit is contained in:
50
src/App.js
50
src/App.js
@@ -591,6 +591,31 @@ function App() {
|
|||||||
setFocusedStoreId(storeId);
|
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) {
|
if (!session?.token) {
|
||||||
return (
|
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 = (
|
const dashboardContent = (
|
||||||
<DashboardView
|
<DashboardView
|
||||||
session={session}
|
session={session}
|
||||||
|
|||||||
Reference in New Issue
Block a user