diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx index 48ef943c4..3ed084b9b 100644 --- a/src/components/Actions.tsx +++ b/src/components/Actions.tsx @@ -197,6 +197,7 @@ export const ShapesSwitcher = ({ penDetected: boolean; setDeviceType: (obj: Partial) => void; }) => { + const pd = useDeviceType().penDetected; return ( <> {SHAPES.map(({ value, icon, key }, index) => { @@ -219,7 +220,7 @@ export const ShapesSwitcher = ({ aria-keyshortcuts={shortcut} data-testid={value} onChange={({ pointerType }) => { - if (!penDetected && pointerType === "pen") { + if (!pd && pointerType === "pen") { setAppState({ penMode: true }); setDeviceType({ penDetected: true }); }