mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix resetFields
This commit is contained in:
@@ -87,9 +87,15 @@ const ReplyModal = ({ isOpen, closeModal }) => {
|
|||||||
|
|
||||||
|
|
||||||
const resetFields = () => {
|
const resetFields = () => {
|
||||||
nameRef.current.value = '';
|
if (nameRef.current) {
|
||||||
commentRef.current.value = '';
|
nameRef.current.value = '';
|
||||||
linkRef.current.value = '';
|
}
|
||||||
|
if (commentRef.current) {
|
||||||
|
commentRef.current.value = '';
|
||||||
|
}
|
||||||
|
if (linkRef.current) {
|
||||||
|
linkRef.current.value = '';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -211,10 +211,18 @@ const Board = () => {
|
|||||||
|
|
||||||
|
|
||||||
const resetFields = () => {
|
const resetFields = () => {
|
||||||
nameRef.current.value = '';
|
if (nameRef.current) {
|
||||||
subjectRef.current.value = '';
|
nameRef.current.value = '';
|
||||||
commentRef.current.value = '';
|
}
|
||||||
linkRef.current.value = '';
|
if (subjectRef.current) {
|
||||||
|
subjectRef.current.value = '';
|
||||||
|
}
|
||||||
|
if (commentRef.current) {
|
||||||
|
commentRef.current.value = '';
|
||||||
|
}
|
||||||
|
if (linkRef.current) {
|
||||||
|
linkRef.current.value = '';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -137,10 +137,18 @@ const Catalog = () => {
|
|||||||
|
|
||||||
|
|
||||||
const resetFields = () => {
|
const resetFields = () => {
|
||||||
nameRef.current.value = '';
|
if (nameRef.current) {
|
||||||
subjectRef.current.value = '';
|
nameRef.current.value = '';
|
||||||
commentRef.current.value = '';
|
}
|
||||||
linkRef.current.value = '';
|
if (subjectRef.current) {
|
||||||
|
subjectRef.current.value = '';
|
||||||
|
}
|
||||||
|
if (commentRef.current) {
|
||||||
|
commentRef.current.value = '';
|
||||||
|
}
|
||||||
|
if (linkRef.current) {
|
||||||
|
linkRef.current.value = '';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -171,9 +171,15 @@ const Thread = () => {
|
|||||||
|
|
||||||
|
|
||||||
const resetFields = () => {
|
const resetFields = () => {
|
||||||
nameRef.current.value = '';
|
if (nameRef.current) {
|
||||||
commentRef.current.value = '';
|
nameRef.current.value = '';
|
||||||
linkRef.current.value = '';
|
}
|
||||||
|
if (commentRef.current) {
|
||||||
|
commentRef.current.value = '';
|
||||||
|
}
|
||||||
|
if (linkRef.current) {
|
||||||
|
linkRef.current.value = '';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user