diff --git a/src/actions/actionCanvas.tsx b/src/actions/actionCanvas.tsx index 9f23ef04..47b090b8 100644 --- a/src/actions/actionCanvas.tsx +++ b/src/actions/actionCanvas.tsx @@ -8,7 +8,7 @@ import { getCommonBounds, getNonDeletedElements } from "../element"; import { newElementWith } from "../element/mutateElement"; import { ExcalidrawElement } from "../element/types"; import { t } from "../i18n"; -import useIsMobile from "../is-mobile"; +import { useIsMobile } from "../is-mobile"; import { CODES, KEYS } from "../keys"; import { getNormalizedZoom, getSelectedElements } from "../scene"; import { centerScrollOn } from "../scene/scroll"; diff --git a/src/actions/actionExport.tsx b/src/actions/actionExport.tsx index 7d5f2287..04f3a2aa 100644 --- a/src/actions/actionExport.tsx +++ b/src/actions/actionExport.tsx @@ -8,7 +8,7 @@ import { Tooltip } from "../components/Tooltip"; import { DarkModeToggle, Appearence } from "../components/DarkModeToggle"; import { loadFromJSON, saveAsJSON } from "../data"; import { t } from "../i18n"; -import useIsMobile from "../is-mobile"; +import { useIsMobile } from "../is-mobile"; import { KEYS } from "../keys"; import { register } from "./register"; import { supported } from "browser-fs-access"; diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx index 03ecd51a..3aac0133 100644 --- a/src/components/Actions.tsx +++ b/src/components/Actions.tsx @@ -3,7 +3,7 @@ import { ActionManager } from "../actions/manager"; import { getNonDeletedElements } from "../element"; import { ExcalidrawElement } from "../element/types"; import { t } from "../i18n"; -import useIsMobile from "../is-mobile"; +import { useIsMobile } from "../is-mobile"; import { canChangeSharpness, canHaveArrowheads, diff --git a/src/components/ButtonIconCycle.tsx b/src/components/ButtonIconCycle.tsx index 1159a1f4..98a6aa8a 100644 --- a/src/components/ButtonIconCycle.tsx +++ b/src/components/ButtonIconCycle.tsx @@ -1,4 +1,3 @@ -import React from "react"; import clsx from "clsx"; export const ButtonIconCycle = ({ @@ -14,11 +13,11 @@ export const ButtonIconCycle = ({ }) => { const current = options.find((op) => op.value === value); - function cycle() { + const cycle = () => { const index = options.indexOf(current!); const next = (index + 1) % options.length; onChange(options[next].value); - } + }; return (