Newer
Older
import { Row, Col, Button } from "react-bootstrap";
import { LinkContainer } from "react-router-bootstrap";
import MyTransactions from "./transaction/MyTransactions";
function Dashboard() {
const [name, setName] = useState(null);
const [balance, setBalance] = useState(null);
let buyButton;
if (!auth.disabled) {
buyButton = (
<LinkContainer to="/purchase">
<Button variant="success">Comprar</Button>
</LinkContainer>
);
}
return (
<Fetcher url={"/api/member/me"} onFetch={onFetch}>
<Row>
<Col xs>
<div className="text-right">
<h6>{name}</h6>
<h1>{printMoney(balance)}€</h1>
</div>
</Col>
<Col xs={{ offset: 0 }} md={{ offset: 1 }}>
<br />
</Col>
</Row>
<OrderCards />
<MyTransactions />
</Fetcher>
);