Web: Components: ContextMenu: fixed isMobile

This commit is contained in:
Nikita Gopienko 2024-05-08 14:55:37 +03:00
parent 739481ae57
commit a0131d5e2c

View File

@ -32,6 +32,7 @@ import { useTheme } from "styled-components";
import ArrowIcon from "PUBLIC_DIR/images/arrow.right.react.svg";
import OutsdideIcon from "PUBLIC_DIR/images/arrow.outside.react.svg";
import { isMobile as isMobileDevice } from "react-device-detect";
import {
classNames,
@ -85,7 +86,7 @@ const SubMenu = (props: {
const theme = useTheme();
const onItemMouseEnter = (e: React.MouseEvent, item: ContextMenuType) => {
if (item.disabled || isTablet() || isMobile()) {
if (item.disabled || isMobileDevice) {
e.preventDefault();
return;
}