Improve lightning paywall display

This commit is contained in:
Kieran 2022-02-27 21:48:10 +00:00
parent a8541ec700
commit 5ef56b7c77
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
4 changed files with 14 additions and 3 deletions

View File

@ -0,0 +1,7 @@
.paywall {
text-align: center;
border: 1px solid lightgreen;
padding: 10px;
margin: 10px;
border-radius: 10px;
}

View File

@ -1,3 +1,4 @@
import "./FilePaywall.css";
import {FormatCurrency} from "./Util";
import {PaywallServices} from "./Const";
import {useState} from "react";
@ -35,9 +36,10 @@ export function FilePaywall(props) {
if (!order) {
return (
<div className="paywall">
<h3>You must pay {FormatCurrency(pw.cost.amount, pw.cost.currency)} to view this
file.</h3>
<button onClick={fetchOrder}>Pay</button>
<h3>
You must pay {FormatCurrency(pw.cost.amount, pw.cost.currency)} to view this file.
</h3>
<div className="btn" onClick={fetchOrder}>Pay</div>
</div>
);
} else {

View File

@ -11,6 +11,7 @@
background-size: cover;
background-position: center;
background-repeat: no-repeat;
border: 2px solid;
}
.small-profile .name {

View File

@ -36,6 +36,7 @@ export function LightningPaywall(props) {
return (
<div className="lightning-invoice" onClick={openInvoice}>
<h1>Pay with Lightning </h1>
<QRCode
value={link}
size={512}