diff --git a/src/components/layout.js b/src/components/layout.js
index 0b014c9..2c973b2 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -6,7 +6,7 @@ import constants from '../constants.json'
// FIXME: window resize event listener to show sidebar on resize
-export default function Layout (props) {
+export default function Layout(props) {
let href = props.route
const [sidebarOpen, setSidebarOpen] = useState(true)
@@ -28,40 +28,40 @@ export default function Layout (props) {
return (
-
-
-
{ setSidebarOpen(!sidebarOpen) }} className='menuicon'>
+
+
+
{
+ setSidebarOpen(!sidebarOpen)
+ }}
+ className="menuicon"
+ >
-
- Frylabs
-
+
Frylabs
- {sidebarOpen
- ?
-
- {props.children}
+ ) : null}
+
{props.children}
)
}
diff --git a/src/data/tabs.json b/src/data/tabs.json
index eee620e..8dc7163 100644
--- a/src/data/tabs.json
+++ b/src/data/tabs.json
@@ -35,5 +35,9 @@
"href": "/feedback",
"text": "Feedback",
"id": "feedback"
+ },
+ "donate": {
+ "href": "/donate",
+ "text": "Donate"
}
}
diff --git a/src/pages/donate.js b/src/pages/donate.js
new file mode 100644
index 0000000..b6c43bf
--- /dev/null
+++ b/src/pages/donate.js
@@ -0,0 +1,43 @@
+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
+ } else {
+ return (
+
+
+ Privacy okokból csak bitcoint lehet adományozni. Ezen az oldalon
+ található a bitcoin cím, és a hozzá tartozó QR kód.
+
+
{btcAddress}
+
+

+
+
+ )
+ }
+}
diff --git a/src/pages/donate.module.css b/src/pages/donate.module.css
new file mode 100644
index 0000000..3dd8e9a
--- /dev/null
+++ b/src/pages/donate.module.css
@@ -0,0 +1,24 @@
+.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;
+}