mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Undo donate changes
This commit is contained in:
parent
15dde276f6
commit
108af5bf2a
5 changed files with 16 additions and 74 deletions
|
@ -58,6 +58,11 @@ export default function Layout(props) {
|
|||
</Link>
|
||||
)
|
||||
})}
|
||||
<Link href={`${constants.siteUrl}donate`}>
|
||||
<a className="donate" onClick={closeSideBar} target="_blank">
|
||||
Donate
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
@ -35,9 +35,5 @@
|
|||
"href": "/feedback",
|
||||
"text": "Feedback",
|
||||
"id": "feedback"
|
||||
},
|
||||
"donate": {
|
||||
"href": "/donate",
|
||||
"text": "Donate"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,8 +87,12 @@ a {
|
|||
height: auto;
|
||||
position: relative;
|
||||
}
|
||||
.sidebar a {float: left;}
|
||||
div.content {margin-left: 0;}
|
||||
.sidebar a {
|
||||
float: left;
|
||||
}
|
||||
div.content {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 700px) {
|
||||
|
@ -190,3 +194,7 @@ a {
|
|||
background-color: #555;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.donate {
|
||||
background-color: #222a26;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue