minor changes

This commit is contained in:
2025-11-10 21:33:35 +01:00
parent 9a3903b761
commit 727af7e26d

View File

@@ -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}