Insured onAuthorChanged saves numeric value instead of a string value

This commit is contained in:
gitdagray 2022-04-11 08:34:18 -05:00
parent c2fec6e6fe
commit 82d81f76a8

View File

@ -29,7 +29,7 @@ const EditPostForm = () => {
const onTitleChanged = e => setTitle(e.target.value)
const onContentChanged = e => setContent(e.target.value)
const onAuthorChanged = e => setUserId(e.target.value)
const onAuthorChanged = e => setUserId(Number(e.target.value))
const canSave = [title, content, userId].every(Boolean) && requestStatus === 'idle';