chore: more labels

This commit is contained in:
bartosz-lipinski 2021-01-05 18:08:38 -06:00
parent 383a4a245d
commit d30ac691b1
3 changed files with 21 additions and 13 deletions

View File

@ -98,7 +98,7 @@ export const ReserveStatus = (props: {
<Row gutter={GUTTER}>
<Col span={6}>
<Statistic
title="Maximum LTV"
title={LABELS.MAX_LTV}
className="small-statisitc"
value={maxLTV}
precision={2}
@ -106,7 +106,7 @@ export const ReserveStatus = (props: {
</Col>
<Col span={6}>
<Statistic
title="Liquidation threashold"
title={LABELS.LIQUIDATION_THREASHOLD}
className="small-statisitc"
value={liquidationThreshold}
precision={2}
@ -114,7 +114,7 @@ export const ReserveStatus = (props: {
</Col>
<Col span={6}>
<Statistic
title="Liquidation penalty"
title={LABELS.LIQUIDATION_PENALTY}
className="small-statisitc"
value={liquidationPenalty}
precision={2}
@ -122,7 +122,7 @@ export const ReserveStatus = (props: {
</Col>
<Col span={6}>
<Statistic
title="APY"
title={LABELS.TABLE_TITLE_DEPOSIT_APY}
className="small-statisitc"
value={depositAPY * 100}
precision={2}

View File

@ -11,6 +11,7 @@ import { formatNumber } from "../../utils/utils";
import { Button, Card, Typography } from "antd";
import { Link } from "react-router-dom";
import { PublicKey } from "@solana/web3.js";
import { LABELS } from "../../constants";
const { Text } = Typography;
@ -48,7 +49,7 @@ export const UserLendingCard = (props: {
</div>
}
>
<h3>Borrows</h3>
<h3>{LABELS.BORROWS}</h3>
<div className="card-row">
<Text type="secondary" className="card-cell ">
@ -64,14 +65,14 @@ export const UserLendingCard = (props: {
<div className="card-row">
<Text type="secondary" className="card-cell ">
Health factor:
{LABELS.TABLE_TITLE_HEALTH}:
</Text>
<div className="card-cell ">{health.toFixed(2)}</div>
</div>
<div className="card-row">
<Text type="secondary" className="card-cell ">
Loan to value:
{LABELS.LOAN_TO_VALUE}:
</Text>
<div className="card-cell ">{formatNumber.format(ltv)}</div>
</div>
@ -88,11 +89,11 @@ export const UserLendingCard = (props: {
</div>
</div>
<h3>Deposits</h3>
<h3>{LABELS.DEPOSITS}</h3>
<div className="card-row">
<Text type="secondary" className="card-cell ">
Wallet balance:
{LABELS.WALLET_BALANCE}:
</Text>
<div className="card-cell ">
<div>
@ -119,16 +120,16 @@ export const UserLendingCard = (props: {
style={{ marginTop: 20, justifyContent: "space-evenly" }}
>
<Link to={`/deposit/${address}`}>
<Button>Deposit</Button>
<Button>{LABELS.DEPOSIT_ACTION}</Button>
</Link>
<Link to={`/borrow/${address}`}>
<Button>Borrow</Button>
<Button>{LABELS.BORROW_ACTION}</Button>
</Link>
<Link to={`/withdraw/${address}`}>
<Button>Withdraw</Button>
<Button>{LABELS.WITHDRAW_ACTION}</Button>
</Link>
<Link to={`/repay/${address}`}>
<Button>Repay</Button>
<Button>{LABELS.REPAY_ACTION}</Button>
</Link>
</div>
</Card>

View File

@ -20,6 +20,9 @@ export const LABELS = {
DASHBOARD_INFO: "Connect to a wallet to view your deposits/loans.",
NO_LOANS_NO_DEPOSITS: "No loans or deposits.",
MENU_DEPOSIT: "Deposit",
DEPOSITS: "Deposits",
BORROWS: "Borrows",
LOAN_TO_VALUE: "Loan to value",
MENU_BORROW: "Borrow",
MENU_LIQUIDATE: "Liquidate",
MENU_FAUCET: "Faucet",
@ -27,6 +30,7 @@ export const LABELS = {
APP_TITLE: "Oyster Lending",
CONNECT_BUTTON: "Connect",
WALLET_TOOLTIP: "Wallet public key",
WALLET_BALANCE: "Wallet balance",
SETTINGS_TOOLTIP: "Settings",
SELECT_COLLATERAL: "Select collateral",
COLLATERAL: "Collateral",
@ -48,6 +52,9 @@ export const LABELS = {
TABLE_TITLE_TOTAL_BORROWED: "Total Borrowed",
TABLE_TITLE_MARKET_SIZE: "Market Size",
TABLE_TITLE_ACTION: "Action",
MAX_LTV: "Maximum LTV",
LIQUIDATION_THREASHOLD: "Liquidation threashold",
LIQUIDATION_PENALTY: "Liquidation penalty",
TABLE_TITLE_MAX_BORROW: "Available for you",
DASHBOARD_TITLE_LOANS: "Loans",
DASHBOARD_TITLE_DEPOSITS: "Deposits",