ConusAI vendor 81941888f
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import type { Note } from '@/entities/note'
|
||||
import { updateNote } from '@/features/edit-note/api/actions'
|
||||
|
||||
export function EditNoteForm({ note }: { note: Note }) {
|
||||
return (
|
||||
<form action={updateNote.bind(null, note.id)}>
|
||||
<label>
|
||||
Title
|
||||
<input name="title" defaultValue={note.title} required maxLength={200} />
|
||||
</label>
|
||||
<label>
|
||||
Body
|
||||
<textarea name="body" rows={3} defaultValue={note.body} />
|
||||
</label>
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user