Fix: History and Queue pagination (#2003)
This commit is contained in:
parent
639bb98423
commit
5ded9ee9e7
|
@ -11,7 +11,7 @@ import NoTransactionsImage from './assets/no-transactions.svg'
|
|||
export const HistoryTransactions = (): ReactElement => {
|
||||
const { count, hasMore, next, transactions, isLoading } = usePagedHistoryTransactions()
|
||||
|
||||
if (isLoading || !transactions) {
|
||||
if (count === 0 && isLoading) {
|
||||
return (
|
||||
<Centered>
|
||||
<Loader size="md" />
|
||||
|
|
|
@ -14,9 +14,7 @@ import { TxLocationContext } from './TxLocationProvider'
|
|||
export const QueueTransactions = (): ReactElement => {
|
||||
const { count, isLoading, hasMore, next, transactions } = usePagedQueuedTransactions()
|
||||
|
||||
// `loading` is, actually `!transactions`
|
||||
// added the `transaction` verification to prevent `Object is possibly 'undefined'` error
|
||||
if (isLoading || !transactions) {
|
||||
if (count === 0 && isLoading) {
|
||||
return (
|
||||
<Centered>
|
||||
<Loader size="md" />
|
||||
|
@ -24,7 +22,9 @@ export const QueueTransactions = (): ReactElement => {
|
|||
)
|
||||
}
|
||||
|
||||
if (count === 0) {
|
||||
// `loading` is, actually `!transactions`
|
||||
// added the `transaction` verification to prevent `Object is possibly 'undefined'` error
|
||||
if (count === 0 || !transactions) {
|
||||
return (
|
||||
<NoTransactions>
|
||||
<Img alt="No Transactions yet" src={NoTransactionsImage} />
|
||||
|
|
Loading…
Reference in New Issue