diff --git a/interface/src/app/main/Dashboard.tsx b/interface/src/app/main/Dashboard.tsx index 137a29b9b..2ae103ab6 100644 --- a/interface/src/app/main/Dashboard.tsx +++ b/interface/src/app/main/Dashboard.tsx @@ -264,7 +264,7 @@ const Dashboard = () => { {!loading && !hasFavEntities && ( - + {LL.NO_DATA_1()}  diff --git a/interface/src/components/MessageBox.tsx b/interface/src/components/MessageBox.tsx index b058c133c..70196c722 100644 --- a/interface/src/components/MessageBox.tsx +++ b/interface/src/components/MessageBox.tsx @@ -11,7 +11,7 @@ type MessageBoxLevel = 'warning' | 'success' | 'info' | 'error'; export interface MessageBoxProps extends BoxProps { level: MessageBoxLevel; - message: string; + message?: string; } const LEVEL_ICONS: { @@ -53,8 +53,8 @@ const MessageBox: FC = ({ {...rest} > - - {message} + + {message ?? ''} {children} diff --git a/mock-api/rest_server.ts b/mock-api/rest_server.ts index 68e82e2b6..461693b66 100644 --- a/mock-api/rest_server.ts +++ b/mock-api/rest_server.ts @@ -268,10 +268,10 @@ function updateMask(entity: any, de: any, dd: any) { const old_custom_name = dd.nodes[dd_objIndex].cn; console.log( 'comparing names, old (' + - old_custom_name + - ') with new (' + - new_custom_name + - ')' + old_custom_name + + ') with new (' + + new_custom_name + + ')' ); if (old_custom_name !== new_custom_name) { changed = true; @@ -366,15 +366,15 @@ function check_upgrade(version: string) { const stable_version = version.split(',')[1]; console.log( 'latest dev version: ' + - dev_version + - ', latest stable version: ' + - stable_version + dev_version + + ', latest stable version: ' + + stable_version ); console.log( 'Version upgrade check from version ' + - THIS_VERSION + - ', upgradable: ' + - VERSION_IS_UPGRADEABLE + THIS_VERSION + + ', upgradable: ' + + VERSION_IS_UPGRADEABLE ); data = { emsesp_version: THIS_VERSION, @@ -4608,7 +4608,6 @@ router t: DeviceType.CUSTOM, nodes: getDashboardEntityData(DeviceTypeUniqueID.CUSTOM_UID) }; - // only add to dashboard if we have values if ((dashboard_object.nodes ?? []).length > 0) { dashboard_data.push(dashboard_object); } @@ -4629,8 +4628,6 @@ router // t: DeviceType.SCHEDULER, // nodes: scheduler_data2 // }; - - // only add to dashboard if we have values // if ((dashboard_object.nodes ?? []).length > 0) { // dashboard_data.push(dashboard_object); // }