Added server/api url

This commit is contained in:
MrFry
2020-03-17 17:54:58 +01:00
parent 49753aa113
commit 4d3f3c0cc4
7 changed files with 19 additions and 5 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ export default function AllQuestions (props) {
useEffect(() => {
console.info('Fetching data')
fetch(`${constants.serverUrl}data.json`)
fetch(`${constants.apiUrl}data.json`)
.then((resp) => {
return resp.json()
})
+1 -1
View File
@@ -5,7 +5,7 @@ export default function Feedback (props) {
// TODO: response to user that msg is sucessfully sent
return (
<div>
<form action={constants.serverUrl + 'postfeedback'} method='post'>
<form action={constants.apiUrl + 'postfeedback'} method='post'>
<div>Észrevételek: (közeledő teszt miatti kérdés-karbantartás, bug, feature vagy egyéb dolog, ami nyomja a lelked)</div>
<textarea
className='feedbackArea'
+1 -1
View File
@@ -14,7 +14,7 @@ export default function Index (props) {
useEffect(() => {
console.info('Fetching data')
fetch(`${constants.serverUrl}motd`)
fetch(`${constants.apiUrl}motd`)
.then((resp) => {
return resp.text()
})
+11
View File
@@ -0,0 +1,11 @@
// TODO: prettier page for donate
export default function Thanks () {
return (
<div>
<center>
<span>Thanks for the donate</span>
</center>
</div>
)
}
+1 -1
View File
@@ -9,7 +9,7 @@ export default function UserQuestions (props) {
useEffect(() => {
console.info('Fetching qa.json')
fetch(`${constants.serverUrl}qa.json`) // eslint-disable-line
fetch(`${constants.apiUrl}qa.json`) // eslint-disable-line
.then((resp) => {
return resp.json()
})