diff --git a/src/components/NoteEditor.tsx b/src/components/NoteEditor.tsx index 76b24df..d660248 100644 --- a/src/components/NoteEditor.tsx +++ b/src/components/NoteEditor.tsx @@ -1,82 +1,14 @@ import { useState } from 'react' -import type { NoteEditorProps, NoteFormProps } from '../interfaces/note-editor' +import type { NoteEditorProps } from '../interfaces/note-editor' import { isTitleValid, normalizeTitle } from '../lib/noteValidation' -import DeleteModal from './DeleteModal' - -const TITLE_REQUIRED_MESSAGE = 'Le titre est obligatoire.' - -function NoteForm({ - title, - content, - titleMissing, - cancelLabel, - onTitleChange, - onContentChange, - onCancel, - onSubmit, -}: NoteFormProps) { - return ( -
{ - event.preventDefault() - onSubmit() - }} - > - - {titleMissing && ( - - {TITLE_REQUIRED_MESSAGE} - - )} -