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

@ -58,6 +58,11 @@ export default function Layout(props) {
</Link> </Link>
) )
})} })}
<Link href={`${constants.siteUrl}donate`}>
<a className="donate" onClick={closeSideBar} target="_blank">
Donate
</a>
</Link>
</div> </div>
) : null} ) : null}
</div> </div>

View file

@ -35,9 +35,5 @@
"href": "/feedback", "href": "/feedback",
"text": "Feedback", "text": "Feedback",
"id": "feedback" "id": "feedback"
},
"donate": {
"href": "/donate",
"text": "Donate"
} }
} }

View file

@ -87,8 +87,12 @@ a {
height: auto; height: auto;
position: relative; position: relative;
} }
.sidebar a {float: left;} .sidebar a {
div.content {margin-left: 0;} float: left;
}
div.content {
margin-left: 0;
}
} }
@media screen and (max-width: 700px) { @media screen and (max-width: 700px) {
@ -190,3 +194,7 @@ a {
background-color: #555; background-color: #555;
color: white; color: white;
} }
.donate {
background-color: #222a26;
}

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;
}