diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx index 72669195a..fcdb98ef6 100644 --- a/src/components/Actions.tsx +++ b/src/components/Actions.tsx @@ -186,14 +186,15 @@ export const ShapesSwitcher = ({ setAppState, onImageAction, appState, + penDetected, }: { canvas: HTMLCanvasElement | null; elementType: AppState["elementType"]; setAppState: React.Component["setState"]; onImageAction: (data: { pointerType: PointerType | null }) => void; appState: AppState; + penDetected: boolean; }) => { - const penDetected = useDeviceType().penDetected; return ( <> {SHAPES.map(({ value, icon, key }, index) => { diff --git a/src/components/LayerUI.tsx b/src/components/LayerUI.tsx index 24013fa3d..276b228aa 100644 --- a/src/components/LayerUI.tsx +++ b/src/components/LayerUI.tsx @@ -352,6 +352,7 @@ const LayerUI = ({ insertOnCanvasDirectly: pointerType !== "mouse", }); }} + penDetected={deviceType.penDetected} /> diff --git a/src/components/MobileMenu.tsx b/src/components/MobileMenu.tsx index 28e3ff0d3..3d715c8de 100644 --- a/src/components/MobileMenu.tsx +++ b/src/components/MobileMenu.tsx @@ -83,6 +83,7 @@ export const MobileMenu = ({ insertOnCanvasDirectly: pointerType !== "mouse", }); }} + penDetected={deviceType.penDetected} />