diff --git a/tinlake-ui/components/Loan/List/index.tsx b/tinlake-ui/components/Loan/List/index.tsx index d86a65ad9f..0de05fd56c 100644 --- a/tinlake-ui/components/Loan/List/index.tsx +++ b/tinlake-ui/components/Loan/List/index.tsx @@ -29,69 +29,74 @@ class LoanList extends React.Component { const { loans } = this.props return ( - , property: 'loanId', align: 'end' }, - { - header: 'NFT ID', - primary: true, - property: 'tokenId', - align: 'end', - render: (l: SortableLoan) => ( - - - - ), - }, - { - header: 'Outstanding (DAI)', - property: 'debtNum', - align: 'end', - render: (l: SortableLoan) => , - }, - { - header: 'Available for Financing (DAI)', - property: 'principalNum', - align: 'end', - render: (l: SortableLoan) => ( - - ), - }, - { - header: , - property: 'interestRateNum', - align: 'end', - render: (l: SortableLoan) => - l.status === 'Repaid' ? ( - '-' - ) : ( - + {loans.length > 0 && ( + , property: 'loanId', align: 'end' }, + { + header: 'NFT ID', + primary: true, + property: 'tokenId', + align: 'end', + render: (l: SortableLoan) => ( + + + ), - }, - { - header: 'Status', - property: 'status', - align: 'end', - render: (l: SortableLoan) => l.status, - }, - { - header: '', - property: 'id', - align: 'center', - sortable: false, - size: '36px', - render: (_l: SortableLoan) => { - return }, - }, - ]} - /> + { + header: 'Outstanding (DAI)', + property: 'debtNum', + align: 'end', + render: (l: SortableLoan) => ( + + ), + }, + { + header: 'Available for Financing (DAI)', + property: 'principalNum', + align: 'end', + render: (l: SortableLoan) => ( + + ), + }, + { + header: , + property: 'interestRateNum', + align: 'end', + render: (l: SortableLoan) => + l.status === 'Repaid' ? ( + '-' + ) : ( + + ), + }, + { + header: 'Status', + property: 'status', + align: 'end', + render: (l: SortableLoan) => l.status, + }, + { + header: '', + property: 'id', + align: 'center', + sortable: false, + size: '36px', + render: (_l: SortableLoan) => { + return + }, + }, + ]} + /> + )} + {loans.length === 0 && No assets have been originated.} ) } diff --git a/tinlake-ui/components/OnboardModal/index.tsx b/tinlake-ui/components/OnboardModal/index.tsx index f6b1dee356..4450e29e1b 100644 --- a/tinlake-ui/components/OnboardModal/index.tsx +++ b/tinlake-ui/components/OnboardModal/index.tsx @@ -5,7 +5,7 @@ import { useRouter } from 'next/router' import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import config, { Pool, UpcomingPool } from '../../config' -import { AuthState, ensureAuthed } from '../../ducks/auth' +import { ensureAuthed } from '../../ducks/auth' import { PoolData as PoolDataV3, PoolState } from '../../ducks/pool' import { PoolsState } from '../../ducks/pools' import { PoolLink } from '../PoolLink' @@ -25,7 +25,6 @@ const OnboardModal: React.FC = (props: Props) => { const router = useRouter() const dispatch = useDispatch() - const authState = useSelector((state) => state.auth) const pools = useSelector((state) => state.pools) const pool = useSelector((state) => state.pool) const poolData = pool?.data as PoolDataV3 | undefined @@ -90,10 +89,6 @@ const OnboardModal: React.FC = (props: Props) => { getOnboardingStatus() }, [pools]) - React.useEffect(() => { - console.log(authState.authState) - }, [authState.authState]) - return ( <> {(poolData?.senior?.inMemberlist || poolData?.junior?.inMemberlist) && ( diff --git a/tinlake-ui/components/Overview/index.tsx b/tinlake-ui/components/Overview/index.tsx index 40213ffb46..f29a1ec0d1 100644 --- a/tinlake-ui/components/Overview/index.tsx +++ b/tinlake-ui/components/Overview/index.tsx @@ -4,6 +4,7 @@ import * as React from 'react' import InvestAction from '../../components/InvestAction' import OnboardModal from '../../components/OnboardModal' import { PoolLink } from '../../components/PoolLink' +import PoolTitle from '../../components/PoolTitle' import config, { Pool, UpcomingPool } from '../../config' import InvestmentOverview from '../../containers/Investment/View/InvestmentOverview' import { PoolState } from '../../ducks/pool' @@ -21,7 +22,7 @@ const Overview: React.FC = (props: Props) => { {!isUpcoming && ( <> - Pool Overview of {props.selectedPool.metadata.name} + )} diff --git a/tinlake-ui/components/PoolTitle/index.tsx b/tinlake-ui/components/PoolTitle/index.tsx new file mode 100644 index 0000000000..2a2920fe73 --- /dev/null +++ b/tinlake-ui/components/PoolTitle/index.tsx @@ -0,0 +1,56 @@ +import * as React from 'react' +import styled from 'styled-components' +import { Pool, UpcomingPool } from '../../config' + +interface Props { + pool: Pool | UpcomingPool + page: string +} + +const PoolTitle: React.FC = (props: Props) => { + return ( + + + + {props.page} + {props.pool.metadata.name} + + + ) +} + +export default PoolTitle + +const Wrapper = styled.div` + display: flex; + flex-direction: row; + margin: 12px 0 36px 8px; +` + +const Icon = styled.img` + width: 40px; + height: 40px; + margin: 4px 16px 0 0; +` + +const PageTitle = styled.div` + display: flex; + flex-direction: column; +` + +const PageName = styled.h1` + font-size: 18px; + font-weight: bold; + margin: 0; +` + +const PoolName = styled.h2` + font-size: 13px; + font-weight: bold; + margin: 0; + color: #979797; +` diff --git a/tinlake-ui/components/TINRatioBar/index.tsx b/tinlake-ui/components/TINRatioBar/index.tsx index 9447a6ccc4..b8704a18fd 100644 --- a/tinlake-ui/components/TINRatioBar/index.tsx +++ b/tinlake-ui/components/TINRatioBar/index.tsx @@ -61,13 +61,6 @@ export const TINRatioBar: React.FC = (props: Props) => { const newSegments = [...minSegments, ...maxSegments] setSegments(newSegments) - } else { - setSegments([ - { - width: 100, - backgroundColor: '#D8D8D8', - }, - ]) } }, [props.min, props.current, props.max]) diff --git a/tinlake-ui/components/TinlakeExplainer/index.tsx b/tinlake-ui/components/TinlakeExplainer/index.tsx index fe642adf55..a6f4c46d38 100644 --- a/tinlake-ui/components/TinlakeExplainer/index.tsx +++ b/tinlake-ui/components/TinlakeExplainer/index.tsx @@ -1,4 +1,4 @@ -import { Anchor } from 'grommet' +import { Box, Button } from 'grommet' import { FormDown } from 'grommet-icons' import * as React from 'react' import { Btn, Caret, Container, Primer, Row, Text } from './styles' @@ -27,12 +27,17 @@ const TinlakeExplainer: React.FC = () => { tokenized real-world assets such as invoices, mortgages or streaming royalties. Tinlakeā€™s smart contract platform coordinates the different parties required to structure, administer and finance collateralized pools of these real-world assets. - + + +