Browse Source

Fix donation link

refactor
Hampus Sjöberg 4 years ago
parent
commit
fab46cefcb
  1. 10
      frontend/components/Donation.tsx

10
frontend/components/Donation.tsx

@ -1,6 +1,7 @@
import React, { useState } from "https://esm.sh/react@17.0.2";
import styled from "https://esm.sh/styled-components";
import { QRCode } from "https://esm.sh/react-qr-svg";
import { Link } from "https://deno.land/x/aleph@v0.2.28/mod.ts";
const DONATION_LNURL_PAY = "LNURL1DP68GURN8GHJ7MRWVF5HGUEWVDHK6TMVDE6HYMRS9ASHQ6F0WCCJ7MRWW4EXCTE38Y6QYWETXD";
@ -23,14 +24,19 @@ export function Donation() {
<DonateContainer>
{!showQr && <DonateText onClick={() => setShowQr(true)}>Donate via Lightning Network</DonateText>}
{showQr && (
<a href={"lightning:" + DONATION_LNURL_PAY.toLowerCase()}>
<div
style={{ cursor: "pointer" }}
onClick={() => {
window.location.replace("lightning:" + DONATION_LNURL_PAY.toLowerCase());
}}
>
<QRCode
bgColor="#FFFFFF"
fgColor="#000000"
value={DONATION_LNURL_PAY}
style={{ border: "8px solid #fff", width: 200 }}
/>
</a>
</div>
)}
</DonateContainer>
);

Loading…
Cancel
Save