diff --git a/src/components/todoStuff/todos.js b/src/components/todoStuff/todos.js index 27956bf..46a80f1 100644 --- a/src/components/todoStuff/todos.js +++ b/src/components/todoStuff/todos.js @@ -72,7 +72,7 @@ export default function Todos() { } const onCardClick = (id) => { - fetch(`${constants.apiUrl}todos?id=${id}`, { + fetch(`${constants.apiUrl}voteTodo?id=${id}`, { credentials: 'include', }) .then((resp) => { diff --git a/src/pages/addQuestion.js b/src/pages/addQuestion.js index 234b18d..5045127 100644 --- a/src/pages/addQuestion.js +++ b/src/pages/addQuestion.js @@ -291,7 +291,7 @@ export default function AddQuestion() { kérdés-válaszok, szóval pl nincs benne kép. Ez később bővül majd
  • - Ha sok új kérdést küldsze be, akkor akár több percig is eltarthat a + Ha sok új kérdést küldesz be, akkor akár több percig is eltarthat a dolog. Akárhány kérdést be lehet egyszerre küldeni, de max 10-15 az ajánlott
  • diff --git a/src/pages/index.js b/src/pages/index.js index f3f772e..eb7405f 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -4,6 +4,7 @@ import React, { useState, useEffect } from 'react' import fetch from 'unfetch' import Head from 'next/head' +import Link from 'next/link' import LoadingIndicator from '../components/LoadingIndicator' import Sleep from '../components/sleep' @@ -12,7 +13,7 @@ import styles from './index.module.css' import links from '../data/links.json' import constants from '../constants.json' -export default function Index({ router }) { +export default function Index() { const [motd, setMotd] = useState('loading...') const [userSpecificMotd, setUserSpecificMotd] = useState('loading...') const [news, setNews] = useState(null) @@ -151,15 +152,11 @@ export default function Index({ router }) { {Object.keys(links).map((key) => { let link = links[key] return ( -
    { - router.push(link.href) - }} - > - {link.text} -
    + + + {link.text} + + ) })} diff --git a/src/pages/index.module.css b/src/pages/index.module.css index fdfd0e0..d6724a0 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -3,7 +3,6 @@ } .button { - flex: 1; color: white; background-color: #303030; margin: 2px; @@ -12,7 +11,9 @@ font-size: 16px; cursor: pointer; word-wrap: break-word; + text-decoration: none; + flex: 1; display: flex; flex-direction: column; justify-content: center; diff --git a/src/pages/pwRequest.js b/src/pages/pwRequest.js index ce0320d..81bf667 100644 --- a/src/pages/pwRequest.js +++ b/src/pages/pwRequest.js @@ -7,9 +7,9 @@ import constants from '../constants.json' export default function PwRequest(props) { const [result, setResult] = useState([]) - const [remaining, setRemaining] = useState() - const [requestedPWS, setRequestedPWS] = useState() - const [createDate, setCreateDate] = useState() + const [remaining, setRemaining] = useState('...') + const [requestedPWS, setRequestedPWS] = useState('...') + const [createDate, setCreateDate] = useState('...') const [addPwPerDay, setAddPwPerDay] = useState('...') const [daysAfterUserGetsPWs, setDaysAfterUserGetsPWs] = useState('...')