perf: optimized response speed

This commit is contained in:
MystiPanda committed 2024-07-08 00:29:49 +08:00
1 parent 9dde385073
commit e371bbedc0
2 files changed
+27 -14

No files matched your search

+4 -3
View File
@@ -171,10 +171,11 @@ const ProfilePage = () => {
}, 100);
try {
await patchProfiles({ current });
mutateLogs();
await mutateLogs();
closeAllConnections();
setTimeout(() => activateSelected(), 2000);
Notice.success(t("Profile Switched"), 1000);
activateSelected().then(() => {
Notice.success(t("Profile Switched"), 1000);
});
} catch (err: any) {
Notice.error(err?.message || err.toString(), 4000);
} finally {