From f5f00945bf94efa6eaa1ba3a6e4b1777a72b7c0c Mon Sep 17 00:00:00 2001 From: skwig <16136203+skwig@users.noreply.github.com> Date: Sun, 25 May 2025 21:39:04 +0200 Subject: [PATCH] Fix: Don't show margins around disabled elements in the Dashboard (#946) Co-authored-by: Jas Singh --- src/components/menus/dashboard/controls/index.tsx | 2 +- src/components/menus/dashboard/directories/index.tsx | 2 +- src/components/menus/dashboard/shortcuts/index.tsx | 2 +- src/components/menus/dashboard/stats/index.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/menus/dashboard/controls/index.tsx b/src/components/menus/dashboard/controls/index.tsx index 337823c..f715fdf 100644 --- a/src/components/menus/dashboard/controls/index.tsx +++ b/src/components/menus/dashboard/controls/index.tsx @@ -9,7 +9,7 @@ import { export const Controls = ({ isEnabled }: ControlsProps): JSX.Element => { if (!isEnabled) { - return ; + return null; } return ( diff --git a/src/components/menus/dashboard/directories/index.tsx b/src/components/menus/dashboard/directories/index.tsx index 2652e5a..24443ce 100644 --- a/src/components/menus/dashboard/directories/index.tsx +++ b/src/components/menus/dashboard/directories/index.tsx @@ -4,7 +4,7 @@ import { LeftLink1, LeftLink2, LeftLink3, RightLink1, RightLink2, RightLink3 } f export const Directories = ({ isEnabled }: DirectoriesProps): JSX.Element => { if (!isEnabled) { - return ; + return null; } return ( diff --git a/src/components/menus/dashboard/shortcuts/index.tsx b/src/components/menus/dashboard/shortcuts/index.tsx index 76fa7dd..a6825a4 100644 --- a/src/components/menus/dashboard/shortcuts/index.tsx +++ b/src/components/menus/dashboard/shortcuts/index.tsx @@ -6,7 +6,7 @@ export const Shortcuts = ({ isEnabled }: ShortcutsProps): JSX.Element => { recordingPoller.initialize(); if (!isEnabled) { - return ; + return null; } return ( diff --git a/src/components/menus/dashboard/stats/index.tsx b/src/components/menus/dashboard/stats/index.tsx index f044989..54e612c 100644 --- a/src/components/menus/dashboard/stats/index.tsx +++ b/src/components/menus/dashboard/stats/index.tsx @@ -15,7 +15,7 @@ initializePollers(cpuService, ramService, gpuService, storageService); export const Stats = ({ isEnabled }: StatsProps): JSX.Element => { if (!isEnabled) { - return ; + return null; } return (