diff --git a/app/notes/CreateNote.tsx b/app/notes/CreateNote.tsx index 8da7c48..7df951e 100644 --- a/app/notes/CreateNote.tsx +++ b/app/notes/CreateNote.tsx @@ -17,14 +17,14 @@ export default function CreateNote() { const router = useRouter(); - const create = async() => { + const create = async(e: React.FormEvent) => { // const db = new PocketBase('http://127.0.0.1:8090'); // await db.records.create('notes', { // title, // content, // }); - + e.preventDefault() await fetch('http://127.0.0.1:8090/api/collections/notes/records', { method: 'POST', headers: { @@ -43,7 +43,7 @@ export default function CreateNote() { } return ( -
+ create(event)}>

Create a new Note