"use client"; import React from "react"; import { useRouter } from "next/navigation"; import { notes } from "@/services/notes"; export default function Create() { const router = useRouter(); const { note, onNoteChange } = useEditNote(); const onSave = async () => { if (!note) { return; } try { const { id, key } = await notes.createNote(note); const passwordParam = `?key=${key}`; router.push(`/view/${id}${passwordParam}`); } catch (error) { console.error("Failed to create a note:", error); } }; return (
Your record will be stored for couple of days. Markdown is supported.