fix: rm macOS transition props

This commit is contained in:
GyDi
2022-07-05 01:24:23 +08:00
parent 7aecd83c4a
commit 2f3b6b29ae
4 changed files with 2 additions and 25 deletions

View File

@@ -4,11 +4,9 @@ import { useLockFn } from "ahooks";
import { Menu, MenuItem } from "@mui/material";
import { Settings } from "@mui/icons-material";
import { changeClashCore, getVergeConfig } from "../../services/cmds";
import getSystem from "../../utils/get-system";
import { getVersion } from "../../services/api";
import Notice from "../base/base-notice";
const OS = getSystem();
const VALID_CORE = [
{ name: "Clash", core: "clash" },
{ name: "Clash Meta", core: "clash-meta" },
@@ -31,7 +29,7 @@ const CoreSwitch = () => {
await changeClashCore(core);
mutate("getVergeConfig");
mutate("getClashConfig");
mutate("getVersion");
mutate("getVersion", getVersion());
setAnchorEl(null);
Notice.success(`Successfully switch to ${core}`, 1000);
} catch (err: any) {
@@ -58,9 +56,6 @@ const CoreSwitch = () => {
anchorPosition={position}
anchorReference="anchorPosition"
transitionDuration={225}
TransitionProps={
OS === "macos" ? { style: { transitionDuration: "225ms" } } : {}
}
onContextMenu={(e) => {
setAnchorEl(null);
e.preventDefault();