diff --git a/centrifuge-app/src/components/LoanList.tsx b/centrifuge-app/src/components/LoanList.tsx
index 51bd645ec3..cb204e25b6 100644
--- a/centrifuge-app/src/components/LoanList.tsx
+++ b/centrifuge-app/src/components/LoanList.tsx
@@ -29,8 +29,8 @@ import { useMetadata } from '../utils/useMetadata'
import { useCentNFT } from '../utils/useNFTs'
import { usePool, usePoolMetadata } from '../utils/usePools'
import { Column, DataTable, SortableTableHeader } from './DataTable'
-import { LoadBoundary } from './LoadBoundary'
import { prefetchRoute } from './Root'
+import { Spinner } from './Spinner'
type Row = (Loan | TinlakeLoan) & {
idSortKey: number
@@ -47,9 +47,10 @@ type Row = (Loan | TinlakeLoan) & {
type Props = {
loans: Loan[] | TinlakeLoan[]
snapshots: AssetSnapshot[]
+ isLoading: boolean
}
-export function LoanList({ loans, snapshots }: Props) {
+export function LoanList({ loans, snapshots, isLoading }: Props) {
const { pid: poolId } = useParams<{ pid: string }>()
if (!poolId) throw new Error('Pool not found')
@@ -266,6 +267,8 @@ export function LoanList({ loans, snapshots }: Props) {
const csvUrl = React.useMemo(() => csvData && getCSVDownloadUrl(csvData as any), [csvData])
+ if (isLoading) return
+
return (
<>
@@ -304,18 +307,16 @@ export function LoanList({ loans, snapshots }: Props) {
-
-
- !row?.marketValue?.isZero())}
- columns={columns}
- onRowClicked={(row) => `${basePath}/${poolId}/assets/${row.id}`}
- pageSize={20}
- page={pagination.page}
- defaultSortKey="maturityDate"
- />
-
-
+
+ !row?.marketValue?.isZero())}
+ columns={columns}
+ onRowClicked={(row) => `${basePath}/${poolId}/assets/${row.id}`}
+ pageSize={20}
+ page={pagination.page}
+ defaultSortKey="maturityDate"
+ />
+
{pagination.pageCount > 1 && (
diff --git a/centrifuge-app/src/pages/Pool/Assets/index.tsx b/centrifuge-app/src/pages/Pool/Assets/index.tsx
index b9ebfc843e..ffc089c64a 100644
--- a/centrifuge-app/src/pages/Pool/Assets/index.tsx
+++ b/centrifuge-app/src/pages/Pool/Assets/index.tsx
@@ -132,7 +132,7 @@ export function PoolDetailAssets() {
-
+
>
)