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

View File

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

View File

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