撤销设备登录后,不再刷新整个列表,改为移除撤销项

This commit is contained in:
mtvpls
2026-06-03 10:45:24 +08:00
parent 21ac54a88b
commit 534ed7b568
+4 -2
View File
@@ -1123,8 +1123,10 @@ export const UserMenu: React.FC = () => {
});
if (response.ok) {
// 重新加载设备列表
await loadDevices();
// 撤销成功后不重新加载列表,仅移除当前撤销的设备项
setDevices((prevDevices) =>
prevDevices.filter((device) => device.tokenId !== tokenId)
);
} else {
alert('撤销失败,请重试');
}