Skip to content

Commit

Permalink
ismac usage
Browse files Browse the repository at this point in the history
  • Loading branch information
m-rgba committed Dec 30, 2024
1 parent 6a16b73 commit b20f9de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ export const PaginationButtons = () => {
marginRight: '4px',
borderRadius: '4px',
}}>
{isMac ? 'Alt' : 'Option'}
{isMac() ? 'Alt' : 'Option'}
</Box>
+
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ const HeaderFileControls: React.FC<{

useEffect(() => {
function onKeyDown(e: KeyboardEvent): void {
if ((isMac && !e.metaKey) || (!isMac && !e.ctrlKey)) {
if ((isMac() && !e.metaKey) || (!isMac() && !e.ctrlKey)) {
return;
}
if (e.key === `z` && canUndo) {
Expand Down Expand Up @@ -618,7 +618,7 @@ const HeaderFileControls: React.FC<{
<IconUndo />
</MenuIcon>
<MenuText>Undo</MenuText>
<MenuShortcut keys={[isMac ? `Cmd` : `Ctrl`, `Z`]} />
<MenuShortcut keys={[isMac() ? `Cmd` : `Ctrl`, `Z`]} />
</MenuItem>
)}
{canRedo && (
Expand All @@ -631,7 +631,7 @@ const HeaderFileControls: React.FC<{
<IconRedo />
</MenuIcon>
<MenuText>Redo</MenuText>
<MenuShortcut keys={[isMac ? `Cmd` : `Ctrl`, `Y`]} />
<MenuShortcut keys={[isMac() ? `Cmd` : `Ctrl`, `Y`]} />
</MenuItem>
)}

Expand Down

0 comments on commit b20f9de

Please sign in to comment.