diff --git a/src/actions/actionExport.tsx b/src/actions/actionExport.tsx
index 16f33f82..e8bd520d 100644
--- a/src/actions/actionExport.tsx
+++ b/src/actions/actionExport.tsx
@@ -8,7 +8,7 @@ import { DarkModeToggle } from "../components/DarkModeToggle";
import { loadFromJSON, saveAsJSON } from "../data";
import { resaveAsImageWithScene } from "../data/resave";
import { t } from "../i18n";
-import { useIsMobile } from "../components/App";
+import { useDeviceType } from "../components/App";
import { KEYS } from "../keys";
import { register } from "./register";
import { CheckboxItem } from "../components/CheckboxItem";
@@ -200,7 +200,7 @@ export const actionSaveFileToDisk = register({
icon={saveAs}
title={t("buttons.saveAs")}
aria-label={t("buttons.saveAs")}
- showAriaLabel={useIsMobile()}
+ showAriaLabel={useDeviceType().isMobile}
hidden={!nativeFileSystemSupported}
onClick={() => updateData(null)}
data-testid="save-as-button"
@@ -243,7 +243,7 @@ export const actionLoadScene = register({
icon={load}
title={t("buttons.load")}
aria-label={t("buttons.load")}
- showAriaLabel={useIsMobile()}
+ showAriaLabel={useDeviceType().isMobile}
onClick={updateData}
data-testid="load-button"
/>
diff --git a/src/actions/actionFinalize.tsx b/src/actions/actionFinalize.tsx
index e89112af..7e9ba25b 100644
--- a/src/actions/actionFinalize.tsx
+++ b/src/actions/actionFinalize.tsx
@@ -165,7 +165,7 @@ export const actionFinalize = register({
(!appState.draggingElement && appState.multiElement === null))) ||
((event.key === KEYS.ESCAPE || event.key === KEYS.ENTER) &&
appState.multiElement !== null),
- PanelComponent: ({ appState, updateData }) => (
+ PanelComponent: ({ appState, updateData, data }) => (
),
});
diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx
index 0efed036..21cbbcf8 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, PointerType } from "../element/types";
import { t } from "../i18n";
-import { useIsMobile } from "../components/App";
+import { useDeviceType } from "../components/App";
import {
canChangeSharpness,
canHaveArrowheads,
@@ -46,7 +46,7 @@ export const SelectedShapeActions = ({
isSingleElementBoundContainer = true;
}
const isEditing = Boolean(appState.editingElement);
- const isMobile = useIsMobile();
+ const deviceType = useDeviceType();
const isRTL = document.documentElement.getAttribute("dir") === "rtl";
const showFillIcons =
@@ -168,8 +168,8 @@ export const SelectedShapeActions = ({