From ba4a4bfd9cf6b063223bc17460178d818389f051 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 6 Mar 2023 12:48:08 +0800 Subject: [PATCH] Make sure there isnt a double separator in reader dropdown --- .../components/templates/PrimaryDropdown.tsx | 149 ++++++++---------- 1 file changed, 68 insertions(+), 81 deletions(-) diff --git a/packages/web/components/templates/PrimaryDropdown.tsx b/packages/web/components/templates/PrimaryDropdown.tsx index e5ec3681e..3359ae897 100644 --- a/packages/web/components/templates/PrimaryDropdown.tsx +++ b/packages/web/components/templates/PrimaryDropdown.tsx @@ -144,26 +144,6 @@ export function PrimaryDropdown(props: PrimaryDropdownProps): JSX.Element { {props.showThemeSection && } - {/* {props.layout == 'LIST_LAYOUT' && ( - - props.updateLayout && props.updateLayout('GRID_LAYOUT') - } - title="Switch to Grid" - /> - )} - {props.layout == 'GRID_LAYOUT' && ( - <> - - props.updateLayout && props.updateLayout('LIST_LAYOUT') - } - title="Switch to List" - /> - - - )} */} - headerDropdownActionHandler('navigate-to-install')} title="Install" @@ -226,58 +206,8 @@ const StyledToggleButton = styled('button', { function ThemeSection(props: PrimaryDropdownProps): JSX.Element { return ( - - - - Mode - - - { - updateTheme(ThemeId.Light) - }} - > - Light - - - { - updateTheme(ThemeId.Darker) - }} - > - Dark - - - - - {props.layout && ( + <> + - Layout + Mode { - props.updateLayout && props.updateLayout('LIST_LAYOUT') + updateTheme(ThemeId.Light) }} > - + Light + { - props.updateLayout && props.updateLayout('GRID_LAYOUT') + updateTheme(ThemeId.Darker) }} > - + Dark + - )} - + {props.layout && ( + + + Layout + + + { + props.updateLayout && props.updateLayout('LIST_LAYOUT') + }} + > + + + { + props.updateLayout && props.updateLayout('GRID_LAYOUT') + }} + > + + + + + )} + + + ) }