Skip to content

Commit

Permalink
fix: toggle dashboard left menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mortada-codes committed Jun 19, 2023
1 parent 0821ab6 commit cd7e617
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/organisms/PaneManager/PaneManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const PaneManager: React.FC = () => {
const currentActivity = useMemo(() => activities.find(a => a.name === leftMenuSelection), [leftMenuSelection]);

const showClosedPanePlaceholder = useMemo(
() => !leftMenuActive && currentActivity?.name === 'explorer',
() => !leftMenuActive && ['explorer', 'dashboard'].includes(currentActivity?.name || ''),
[currentActivity?.name, leftMenuActive]
);

Expand Down Expand Up @@ -151,7 +151,8 @@ const PaneManager: React.FC = () => {
isLeftActive={leftMenuActive}
paneCloseIconStyle={{top: '20px', right: '-8px'}}
left={
currentActivity?.name !== 'explorer' || (leftMenuActive && currentActivity.name === 'explorer')
!['explorer', 'dashboard'].includes(currentActivity?.name || '') ||
(leftMenuActive && ['explorer', 'dashboard'].includes(currentActivity?.name || ''))
? currentActivity?.component
: undefined
}
Expand All @@ -167,7 +168,7 @@ const PaneManager: React.FC = () => {
<ActionsPane />
)
}
leftClosable={currentActivity?.name === 'explorer'}
leftClosable={['explorer', 'dashboard'].includes(currentActivity?.name || '')}
onCloseLeftPane={() => dispatch(toggleLeftMenu())}
defaultSizes={columnsSizes}
onDragEnd={handleColumnResize}
Expand Down

0 comments on commit cd7e617

Please sign in to comment.