fix resetFields

This commit is contained in:
Tom
2023-04-25 22:07:33 +02:00
parent 610ea65c67
commit 9f6a5d8e60
4 changed files with 42 additions and 14 deletions
+6
View File
@@ -87,9 +87,15 @@ const ReplyModal = ({ isOpen, closeModal }) => {
const resetFields = () => { const resetFields = () => {
if (nameRef.current) {
nameRef.current.value = ''; nameRef.current.value = '';
}
if (commentRef.current) {
commentRef.current.value = ''; commentRef.current.value = '';
}
if (linkRef.current) {
linkRef.current.value = ''; linkRef.current.value = '';
}
}; };
+8
View File
@@ -211,10 +211,18 @@ const Board = () => {
const resetFields = () => { const resetFields = () => {
if (nameRef.current) {
nameRef.current.value = ''; nameRef.current.value = '';
}
if (subjectRef.current) {
subjectRef.current.value = ''; subjectRef.current.value = '';
}
if (commentRef.current) {
commentRef.current.value = ''; commentRef.current.value = '';
}
if (linkRef.current) {
linkRef.current.value = ''; linkRef.current.value = '';
}
}; };
+8
View File
@@ -137,10 +137,18 @@ const Catalog = () => {
const resetFields = () => { const resetFields = () => {
if (nameRef.current) {
nameRef.current.value = ''; nameRef.current.value = '';
}
if (subjectRef.current) {
subjectRef.current.value = ''; subjectRef.current.value = '';
}
if (commentRef.current) {
commentRef.current.value = ''; commentRef.current.value = '';
}
if (linkRef.current) {
linkRef.current.value = ''; linkRef.current.value = '';
}
}; };
+6
View File
@@ -171,9 +171,15 @@ const Thread = () => {
const resetFields = () => { const resetFields = () => {
if (nameRef.current) {
nameRef.current.value = ''; nameRef.current.value = '';
}
if (commentRef.current) {
commentRef.current.value = ''; commentRef.current.value = '';
}
if (linkRef.current) {
linkRef.current.value = ''; linkRef.current.value = '';
}
}; };