chore: labels

This commit is contained in:
bartosz-lipinski 2020-11-30 08:52:36 -06:00
parent 851ac577c5
commit c193cf2b4f
3 changed files with 7 additions and 4 deletions

View File

@ -13,6 +13,8 @@ export const LABELS = {
'This page was produced by the Solana Foundation ("SF") for internal educational and inspiration purposes only. SF does not encourage, induce or sanction the deployment, integration or use of Oyster or any similar application (including its code) in violation of applicable laws or regulations and hereby prohibits any such deployment, integration or use. Anyone using this code or a derivation thereof must comply with applicable laws and regulations when releasing related software.',
MENU_HOME: "Home",
MENU_DASHBOARD: "Dashboard",
DASHBOARD_INFO: "Connect to a wallet to view your deposits/loans.",
NO_LOANS_NO_DEPOSITS: "No loans or deposits.",
MENU_DEPOSIT: "Deposit",
MENU_BORROW: "Borrow",
MENU_FAUCET: "Faucet",

View File

@ -7,6 +7,7 @@ import { Button, Card } from "antd";
import { Link } from "react-router-dom";
import { TokenAccount } from "../../models";
import { ParsedAccount } from "../../contexts/accounts";
import { LABELS } from "../../constants";
export const DepositItem = (props: {
reserve: ParsedAccount<LendingReserve>;
@ -37,12 +38,12 @@ export const DepositItem = (props: {
<div style={{ display: "flex", justifyContent: "flex-end" }}>
<Link to={`/deposit/${props.reserve.pubkey.toBase58()}`}>
<Button>
<span>Deposit</span>
<span>{LABELS.DEPOSIT_ACTION}</span>
</Button>
</Link>
<Link to={`/withdraw/${props.reserve.pubkey.toBase58()}`}>
<Button>
<span>Withdraw</span>
<span>{LABELS.WITHDRAW_ACTION}</span>
</Button>
</Link>
</div>

View File

@ -15,13 +15,13 @@ export const DashboardView = () => {
<div className="dashboard-container">
{!connected && (
<div className="dashboard-info">
Connect to a wallet to view your deposits/loans.
{LABELS.DASHBOARD_INFO}
</div>
)}
{connected &&
userDeposits.length === 0 &&
userObligations.length === 0 && (
<div className="dashboard-info">No loans or deposits.</div>
<div className="dashboard-info">{LABELS.NO_LOANS_NO_DEPOSITS}</div>
)}
{userDeposits.length > 0 && (
<div className="dashboard-left">