Skip to content

Commit

Permalink
Automated linting update and features.json sync
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 24, 2023
1 parent a576979 commit 0a034ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions packages/studio-ui/src/components/UndoRedo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ export default function UndoRedo(): JSX.Element {

const handleUndoKeydown = useCallback(
(event: KeyboardEvent) => {
const actionKey = platform.os.family === "OS X"
? event.metaKey
: event.ctrlKey;
const actionKey =
platform.os.family === "OS X" ? event.metaKey : event.ctrlKey;
if (actionKey && event.key === "z") {
event.preventDefault();
undo();
Expand Down
14 changes: 7 additions & 7 deletions packages/studio-ui/tests/components/UndoRedo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jest.mock("platform", () => ({
__esModule: true,
default: {
os: {
family: null
}
}
}))
family: null,
},
},
}));

describe("Undo/redo", () => {
beforeEach(() => {
Expand Down Expand Up @@ -57,8 +57,8 @@ describe("Undo/redo", () => {
});

it("undoes last state update using control + z", async () => {
platform.os.family = "Windows"
platform.os.family = "Windows";

render(<UndoRedo />);
expect(useStudioStore.getState().pages.activeComponentUUID).toBe(
"searchbar-uuid"
Expand All @@ -68,7 +68,7 @@ describe("Undo/redo", () => {
});

it("undoes last state update using command + z", async () => {
platform.os.family = "OS X"
platform.os.family = "OS X";

render(<UndoRedo />);
expect(useStudioStore.getState().pages.activeComponentUUID).toBe(
Expand Down

0 comments on commit 0a034ee

Please sign in to comment.