From 1d074dae2e944e41a4565e6e2f1733563f235380 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Fri, 26 May 2023 18:46:29 -0700 Subject: [PATCH] Adjust conditionals in a few places --- src/renderer/components/scroll-area/index.tsx | 8 ++++++-- src/renderer/features/home/routes/home-route.tsx | 4 +--- .../now-playing/components/sidebar-play-queue.tsx | 10 +++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/renderer/components/scroll-area/index.tsx b/src/renderer/components/scroll-area/index.tsx index ccb705c4..386645e5 100644 --- a/src/renderer/components/scroll-area/index.tsx +++ b/src/renderer/components/scroll-area/index.tsx @@ -34,14 +34,18 @@ const StyledNativeScrollArea = styled.div<{ scrollBarOffset?: string; windowBarS &::-webkit-scrollbar-track { margin-top: ${(props) => - props.windowBarStyle === Platform.WINDOWS || props.windowBarStyle === Platform.MACOS + props.windowBarStyle === Platform.WINDOWS || + props.windowBarStyle === Platform.MACOS || + props.windowBarStyle === Platform.LINUX ? '0px' : props.scrollBarOffset || '65px'}; } &::-webkit-scrollbar-thumb { margin-top: ${(props) => - props.windowBarStyle === Platform.WINDOWS || props.windowBarStyle === Platform.MACOS + props.windowBarStyle === Platform.WINDOWS || + props.windowBarStyle === Platform.MACOS || + props.windowBarStyle === Platform.LINUX ? '0px' : props.scrollBarOffset || '65px'}; } diff --git a/src/renderer/features/home/routes/home-route.tsx b/src/renderer/features/home/routes/home-route.tsx index 7978825e..9d98c4e5 100644 --- a/src/renderer/features/home/routes/home-route.tsx +++ b/src/renderer/features/home/routes/home-route.tsx @@ -138,9 +138,7 @@ const HomeRoute = () => { diff --git a/src/renderer/features/now-playing/components/sidebar-play-queue.tsx b/src/renderer/features/now-playing/components/sidebar-play-queue.tsx index 0de8d534..bb921d77 100644 --- a/src/renderer/features/now-playing/components/sidebar-play-queue.tsx +++ b/src/renderer/features/now-playing/components/sidebar-play-queue.tsx @@ -13,17 +13,17 @@ export const SidebarPlayQueue = () => { const queueRef = useRef<{ grid: AgGridReactType } | null>(null); const { windowBarStyle } = useWindowSettings(); - const webOrNative = windowBarStyle === Platform.WEB || windowBarStyle === Platform.LINUX; + const isWeb = windowBarStyle === Platform.WEB; return ( - {webOrNative && ( - + {isWeb && ( + )}