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

@@ -55,7 +55,7 @@ const SettingVerge = ({ onError }: Props) => {
mutateVerge({ ...verge, ...patch }, false);
};
const onCheckUpdate = useLockFn(async () => {
const onCheckUpdate = async () => {
try {
const info = await checkUpdate();
if (!info?.shouldUpdate) {
@@ -66,7 +66,7 @@ const SettingVerge = ({ onError }: Props) => {
} catch (err: any) {
Notice.error(err.message || err.toString());
}
});
};
return (
<SettingList title={t("Verge Setting")}>