feat: add unified delay

This commit is contained in:
huzibaca
2024-11-05 16:24:58 +08:00
parent ab7775e1ef
commit 2833718c90
15 changed files with 37 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
import useSWR, { mutate } from "swr";
import { useLockFn } from "ahooks";
import { getAxios, getVersion, updateConfigs } from "@/services/api";
import { getAxios, getVersion } from "@/services/api";
import {
getClashInfo,
patchClashConfig,
@@ -19,7 +19,6 @@ export const useClash = () => {
);
const patchClash = useLockFn(async (patch: Partial<IConfigData>) => {
await updateConfigs(patch);
await patchClashConfig(patch);
mutateClash();
});