feat: add refresh button

This commit is contained in:
JustSong
2023-05-15 16:20:01 +08:00
parent aae92683d7
commit 44ebae1559
2 changed files with 13 additions and 1 deletions

View File

@@ -66,6 +66,11 @@ const TokensTable = () => {
})();
};
const refresh = async () => {
setLoading(true);
await loadTokens(0);
}
useEffect(() => {
loadTokens(0)
.then()
@@ -334,6 +339,7 @@ const TokensTable = () => {
<Button size='small' as={Link} to='/token/add' loading={loading}>
添加新的令牌
</Button>
<Button size='small' onClick={refresh} loading={loading}>刷新</Button>
<Pagination
floated='right'
activePage={activePage}