Skip to content

🎥 Make videos programmatically with React

move undo to the right

JonnyBurger6212255cb112
diff --git a/packages/studio/src/components/MenuToolbar.tsx b/packages/studio/src/components/MenuToolbar.tsx
index 97c13887b4..3514cea9fe 100644
--- a/packages/studio/src/components/MenuToolbar.tsx
+++ b/packages/studio/src/components/MenuToolbar.tsx
@@ -135,12 +135,12 @@ export const MenuToolbar: React.FC<{
);
})}
{readOnlyStudio ? null : <UpdateCheck />}
- {readOnlyStudio ? null : <UndoRedoButtons />}
</div>
<div style={flex} />
<MenuBuildIndicator />
<div style={flex} />
<div style={fixedWidthRight}>
+ {readOnlyStudio ? null : <UndoRedoButtons />}
<SidebarCollapserControls />
</div>
<Spacing x={1} />
diff --git a/packages/studio/src/components/UndoRedoButtons.tsx b/packages/studio/src/components/UndoRedoButtons.tsx
index c96a4a8f27..f394b67b0b 100644
--- a/packages/studio/src/components/UndoRedoButtons.tsx
+++ b/packages/studio/src/components/UndoRedoButtons.tsx
@@ -125,20 +125,18 @@ export const UndoRedoButtons: React.FC = () => {
return (
<>
- {canUndo ? (
- <InlineAction
- onClick={onUndo}
- renderAction={renderUndo}
- title={undoTooltip}
- />
- ) : null}
- {canRedo ? (
- <InlineAction
- onClick={onRedo}
- renderAction={renderRedo}
- title={redoTooltip}
- />
- ) : null}
+ <InlineAction
+ onClick={onUndo}
+ renderAction={renderUndo}
+ title={undoTooltip}
+ disabled={!canUndo}
+ />
+ <InlineAction
+ onClick={onRedo}
+ renderAction={renderRedo}
+ title={redoTooltip}
+ disabled={!canRedo}
+ />
</>
);
};