react-icons/ri#RiQrCodeLine JavaScript Examples
The following examples show how to use
react-icons/ri#RiQrCodeLine.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.jsx From nightfall_3 with Creative Commons Zero v1.0 Universal | 5 votes |
export default function Assets({ tokenList }) {
const [modalShow, setModalShow] = useState(false);
const [showSendModal, setShowSendModal] = useState(false);
const tokenDepositId = `TokenItem_tokenDeposit${tokenList[0].symbol}`;
const total = tokenList.reduce(
(acc, curr) =>
acc + (Number(curr.currencyValue) * Number(curr.l2Balance)) / 10 ** Number(curr.decimals),
0,
);
return (
<div className="dashboardTopSection">
<div className="container">
<div className="containerLeftSide">
<div className="heading">Polygon Nightfall</div>
<div className="amount">${total.toFixed(2)}</div>
<div className="buttonsWrapper">
<button type="button" onClick={() => setModalShow(true)}>
<RiQrCodeLine />
<span>Receive</span>
</button>
<button type="button" icon-name="navbar/send" onClick={() => setShowSendModal(true)}>
<FiSend />
<span>Send</span>
</button>
</div>
</div>
<div className="depositWrapper">
<a
className="linkButton"
href="https://docs.polygon-nightfall.technology/Nightfall/tools/nightfall-wallet/"
target="_blank"
rel="noopener noreferrer"
>
How it works?
</a>
<button type="button" className="linkButton" onClick={() => {}}>
<Link
to={{
pathname: '/bridge',
tokenState: {
tokenAddress: tokenList[0].address,
initialTxType: 'deposit',
},
}}
id={tokenDepositId}
>
<span>Move funds from Ethereum to Nightfall</span>
</Link>
</button>
</div>
</div>
<ReceiveModal show={modalShow} onHide={() => setModalShow(false)} />
<SendModal
show={showSendModal}
onHide={() => setShowSendModal(false)}
currencyValue={tokenList[0].currencyValue}
l2Balance={tokenList[0].l2Balance}
name={tokenList[0].name}
symbol={tokenList[0].symbol}
address={tokenList[0].address}
logoURI={tokenList[0].logoURI}
decimals={tokenList[0].decimals}
/>
</div>
);
}