Undo donate changes

This commit is contained in:
mrfry 2020-11-11 08:02:59 +01:00
parent 15dde276f6
commit 108af5bf2a
5 changed files with 16 additions and 74 deletions

View file

@ -1,43 +0,0 @@
import React, { useState, useEffect } from 'react'
import LoadingIndicator from '../components/LoadingIndicator.js'
import constants from '../constants.json'
import styles from './donate.module.css'
export default function Donate(props) {
const [btcAddress, setBtcAddress] = useState()
useEffect(() => {
console.info('Fetching news.json')
fetch(`${constants.apiUrl}btc/btcaddress`, {
credentials: 'include',
})
.then((resp) => {
return resp.text()
})
.then((data) => {
setBtcAddress(data)
})
}, [])
if (!btcAddress) {
return <LoadingIndicator />
} else {
return (
<div className={styles.container}>
<div className={styles.text}>
Privacy okokból csak bitcoint lehet adományozni. Ezen az oldalon
található a bitcoin cím, és a hozzá tartozó QR kód.
</div>
<div className={styles.address}>{btcAddress}</div>
<div>
<img
src={`${constants.apiUrl}btc/btcaddress.png`}
className={styles.qr}
/>
</div>
</div>
)
}
}

View file

@ -1,24 +0,0 @@
.address {
margin: 20px 0px;
font-size: 20px;
color: white;
word-wrap: break-word;
overflow-wrap: anywhere;
text-align: center;
}
.text {
margin: 5px 0px;
text-align: center;
}
.qr {
max-width: 100%;
width: 400px;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
}