* feat: handle URLs with or without trailing slash (#803) * feat: handle URLs with or without trailing slash * tidy: cleanup slashes * Fix docker build (#805) * fix: fixed the docker build * tidy: cleanup * env: remove env contents (#808) * Portfolio fix (#809) * fix: fixed the portfolio account detail page layout * fix: fixed portfolio cards * tidy: refactor * align buttons, perps row clickable (#807) * align buttons, perps row clickable * fix comments * update to v2.2.4 * fix borrowbutton logic, add vault deposit manage btn, fix icon size vault modal --------- Co-authored-by: Linkie Link <linkielink.dev@gmail.com> --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com>
34 lines
925 B
TypeScript
34 lines
925 B
TypeScript
import { Row } from '@tanstack/react-table'
|
|
import { useCallback } from 'react'
|
|
|
|
import MarketDetails from 'components/common/MarketDetails'
|
|
import Table from 'components/common/Table'
|
|
import { NAME_META } from 'components/earn/lend/Table/Columns/Name'
|
|
import useDepositedColumns from 'components/earn/lend/Table/Columns/useDepositedColumns'
|
|
|
|
type Props = {
|
|
data: LendingMarketTableData[]
|
|
isLoading: boolean
|
|
}
|
|
|
|
export default function DepositedLendsTable(props: Props) {
|
|
const columns = useDepositedColumns({ isLoading: props.isLoading })
|
|
|
|
const renderExpanded = useCallback(
|
|
(row: Row<LendingMarketTableData>) => <MarketDetails row={row} type='lend' />,
|
|
[],
|
|
)
|
|
|
|
if (!props.data.length) return null
|
|
|
|
return (
|
|
<Table
|
|
title='Lent Assets'
|
|
columns={columns}
|
|
data={props.data}
|
|
initialSorting={[{ id: NAME_META.id, desc: false }]}
|
|
renderExpanded={renderExpanded}
|
|
/>
|
|
)
|
|
}
|