Fix more button shown after logs deleted
This commit is contained in:
parent
d9e9a6722a
commit
58c37bbd63
|
@ -254,5 +254,10 @@ export function useWalletLogs (wallet, initialPage = 1, logsPerPage = 10) {
|
|||
loadLogs()
|
||||
}, [wallet?.def])
|
||||
|
||||
useEffect(() => {
|
||||
// make sure 'more' button is removed if logs are deleted
|
||||
if (logs.length === 0) setHasMore(false)
|
||||
}, [logs?.length])
|
||||
|
||||
return { logs, hasMore, total, loadMore, loadLogs, setLogs, loading }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue