diff --git a/src/components/todoStuff/todos.js b/src/components/todoStuff/todos.js index 8f04bc6..9edfd39 100644 --- a/src/components/todoStuff/todos.js +++ b/src/components/todoStuff/todos.js @@ -7,7 +7,6 @@ import TodoSidebar from './todoSidebar.js' import Modal from '../modal.js' import styles from './todo.module.css' -// import styles from './todos.module.css' import constants from '../../constants.json' const byVotes = (a, b) => { diff --git a/src/constants.json b/src/constants.json index 2e8bdb3..8650745 100644 --- a/src/constants.json +++ b/src/constants.json @@ -1,6 +1,6 @@ { "siteUrl": "https://qmining.frylabs.net/", - "apiUrl": "https://qmining.frylabs.net/", + "apiUrl": "https://api.frylabs.net/", "mobileWindowWidth": 700, "maxQuestionsToRender": 250 } diff --git a/src/pages/todos.js b/src/pages/todos.js deleted file mode 100644 index 341ca16..0000000 --- a/src/pages/todos.js +++ /dev/null @@ -1,80 +0,0 @@ -import React, { useState } from 'react' -import Head from 'next/head' - -import Sleep from '../components/sleep' -import Todos from '../components/todoStuff/todos' - -import constants from '../constants.json' -import styles from './todos.module.css' - -export default function contribute() { - const [newTask, setNewTask] = useState('') - - const submitNewTask = async () => { - if (!newTask) { - return - } - - fetch(constants.apiUrl + 'postfeedback', { - method: 'POST', - credentials: 'include', - headers: { - Accept: 'application/json', - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - newTask: newTask, - from: 'contribute', - }), - }) - .then((resp) => { - return resp.json() - }) - .then((resp) => { - if (resp.success) { - alert('Elküldve') - setNewTask('') - } else { - alert('Hiba küldés közben') - } - }) - .catch((err) => { - alert('Hiba küldés közben') - console.error(err) - }) - } - - const renderNewTaskArea = () => { - return ( -
-