Skip to content

Commit

Permalink
feat: IMPROVE - remain Undo button on position #245
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSusa committed Nov 21, 2020
1 parent f1b84bc commit 698a59b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/midi-bricks/src/components/menu-app-bar/MenuAppBarCmp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,6 @@ function MenuAppBarCmp(props) {
/>
</>
)}
<ToolTipIconButton
handleClick={() => dispatch(thunkUndoRedo({ offset: -1 }))}
title='Undo'
icon={<UndoIcon />}
isInvisible={
!JSON.parse(window.sessionStorage.getItem('history')) ||
JSON.parse(window.sessionStorage.getItem('history')).length < 1
}
/>
{pageType === PAGE_TYPES.GLOBAL_MODE && (
<>
<Typography className={classes.typoColorStyle}>
Expand Down Expand Up @@ -286,6 +277,16 @@ function MenuAppBarCmp(props) {
isInvisible={!isMidiLearnMode || isLayoutMode}
icon={<CancelIcon />}
/>
<ToolTipIconButton
handleClick={() => dispatch(thunkUndoRedo({ offset: -1 }))}
title='Undo'
icon={<UndoIcon />}
isInvisible={
!JSON.parse(window.sessionStorage.getItem('history')) ||
JSON.parse(window.sessionStorage.getItem('history')).length <
1
}
/>
</Fragment>
)}
</Toolbar>
Expand Down

0 comments on commit 698a59b

Please sign in to comment.