diff --git a/components/AddTodoForm.js b/components/AddTodoForm.js index acc763c..9887c6b 100644 --- a/components/AddTodoForm.js +++ b/components/AddTodoForm.js @@ -6,6 +6,8 @@ const AddTodo = ({ addTodo }) => { const [message, setMessage] = useState('') const handleSubmit = (e) => { + console.log('test') + e.preventDefault() if (!title) { setError('Title is required') diff --git a/components/Todo.js b/components/Todo.js index f8895ad..57c0dea 100644 --- a/components/Todo.js +++ b/components/Todo.js @@ -3,6 +3,7 @@ import React, { useState } from 'react' const Todo = (props) => { const [todo, setTodo] = useState(props.todo) + console.log('test') const updateTodo = async () => { const data = { completed: true, diff --git a/components/layout/Navigation.js b/components/layout/Navigation.js index cd573b6..e69792e 100644 --- a/components/layout/Navigation.js +++ b/components/layout/Navigation.js @@ -3,6 +3,8 @@ import { useState } from 'react' import SVG from 'react-inlinesvg' const NavItem = ({ children, href }) => { + console.log('test') + return (
  • Hi this is a header section } diff --git a/pages/api/todo/[id].js b/pages/api/todo/[id].js index b674b60..32503b8 100644 --- a/pages/api/todo/[id].js +++ b/pages/api/todo/[id].js @@ -1,6 +1,8 @@ import prisma from '../../../prisma' export default async function handle(req, res) { + console.log('test') + if (req.method == 'PUT') { // update a todo.