feat(settings page): add loading state (#1157)

* feat(settings page): add loading state

* fix: type
This commit is contained in:
Eric Huang
2024-06-09 06:26:07 +08:00
committed by GitHub
parent 97bd51cf5f
commit ad35ed96c8
4 changed files with 29 additions and 8 deletions

View File

@@ -51,14 +51,14 @@ const SettingClash = ({ onError }: Props) => {
const onChangeVerge = (patch: Partial<IVergeConfig>) => {
mutateVerge({ ...verge, ...patch }, false);
};
const onUpdateGeo = useLockFn(async () => {
const onUpdateGeo = async () => {
try {
await updateGeoData();
Notice.success(t("GeoData Updated"));
} catch (err: any) {
Notice.error(err?.response.data.message || err.toString());
}
});
};
return (
<SettingList title={t("Clash Setting")}>