refactor: use unified isMac implement

This commit is contained in:
tzhangchi
2022-12-18 13:14:03 +08:00
parent 602d8163f5
commit 820d8d476a
@@ -15,13 +15,14 @@ import {
} from '@/components/shortcuts-modal/config';
import Slide from '@mui/material/Slide';
import { ModalCloseButton } from '@/ui/modal';
import { getUaHelper } from '@/utils';
type ModalProps = {
open: boolean;
onClose: () => void;
};
const isMac = () => {
return /macintosh|mac os x/i.test(navigator.userAgent);
return getUaHelper().isMacOs;
};
export const ShortcutsModal = ({ open, onClose }: ModalProps) => {