diff --git a/src/components/Shell/ShellAppBar.tsx b/src/components/Shell/ShellAppBar.tsx index 1e54d89..c730251 100644 --- a/src/components/Shell/ShellAppBar.tsx +++ b/src/components/Shell/ShellAppBar.tsx @@ -28,19 +28,21 @@ export const AppBar = styled(MuiAppBar, { ...(isDrawerOpen && { width: `calc(100% - ${drawerWidth}px)`, marginLeft: `${drawerWidth}px`, - transition: theme.transitions.create(['margin', 'width'], { - easing: theme.transitions.easing.easeOut, - duration: theme.transitions.duration.enteringScreen, - }), }), ...(isPeerListOpen && { width: `calc(100% - ${peerListWidth}px)`, marginRight: `${peerListWidth}px`, + }), + ...((isDrawerOpen || isPeerListOpen) && { transition: theme.transitions.create(['margin', 'width'], { easing: theme.transitions.easing.easeOut, duration: theme.transitions.duration.enteringScreen, }), }), + ...(isDrawerOpen && + isPeerListOpen && { + width: `calc(100% - ${drawerWidth}px - ${peerListWidth}px)`, + }), })) interface ShellAppBarProps {