diff --git a/components/ComplainsDetails.tsx b/components/ComplainsDetails.tsx index 2cbd0a6..d115fc8 100644 --- a/components/ComplainsDetails.tsx +++ b/components/ComplainsDetails.tsx @@ -165,7 +165,7 @@ export default function ComplainsDetails({ برای مشاهده گزارش رمز عبور خود را وارد نمایید. -
+
{/* */} +
{/* 1 */}
{/* ***** */} -
+

انجام عملیات

@@ -236,7 +236,7 @@ export default function ComplainsDetails({ possibleOperations.length == 0 && "lg:w-full" }`} > -
+
{data?.user == null ? ( <>
@@ -346,7 +346,7 @@ export default function ComplainsDetails({
-
+

روند رسیدگی گزارش

@@ -357,9 +357,9 @@ export default function ComplainsDetails({ {data.contents?.map((item: any, index: any, array: any) => { return ( <> -
+
- + {array.length - index}
@@ -391,7 +391,7 @@ export default function ComplainsDetails({

- + {item.text ? item.text : "-"}
@@ -414,12 +414,14 @@ export default function ComplainsDetails({ ) } > - - -

+

{/* diff --git a/components/InspectorOperations.tsx b/components/InspectorOperations.tsx index 80e3814..3c29af2 100644 --- a/components/InspectorOperations.tsx +++ b/components/InspectorOperations.tsx @@ -121,7 +121,10 @@ export default function InspectorOperations({ // Add the useEffect hook to monitor changes in the description field useEffect(() => { - setCharCount(form.watch("text")?.length); + if (charCount != 0) { + setCharCount(form.watch("text")?.length); + console.log(charCount); + } }, [form.watch("text")]); function handleTextChange(event: React.ChangeEvent) { @@ -166,16 +169,19 @@ export default function InspectorOperations({ const withDot = split?.map((item: string) => "." + item); const newAllowedExtensions = withDot?.join(","); const formatSize = (size: number) => { - const string = formatBytes(size); + const string = formatBytes(size); return ( - + {string[0]} {string[1]} ); }; return (
- +