Skip to content

Commit

Permalink
fix(useIsTouchDevice): reset touch device state on cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaroma committed Dec 9, 2024
1 parent a02e037 commit ad8a89c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ export function useIsTouchDevice() {

return () => {
window.removeEventListener("resize", onResize);
setIsTouchDevice(false);
};
}, []);

Expand Down

0 comments on commit ad8a89c

Please sign in to comment.