diff --git a/app/UserPanel/(Admin)/AdminDashboard/error.tsx b/app/UserPanel/(Admin)/AdminDashboard/error.tsx index 101c38c..c08a21f 100644 --- a/app/UserPanel/(Admin)/AdminDashboard/error.tsx +++ b/app/UserPanel/(Admin)/AdminDashboard/error.tsx @@ -1,6 +1,6 @@ 'use client' // Error components must be Client Components -import { useEffect } from 'react' +// import { useEffect } from 'react' export default function Error({ error, @@ -9,21 +9,20 @@ export default function Error({ error: Error & { digest?: string } reset: () => void }) { - useEffect(() => { - // Log the error to an error reporting service - console.error(error) - }, [error]) + // useEffect(() => { + // // Log the error to an error reporting service + // console.error(error) + // }, [error]) return ( -
-

Something went wrong!

+
+

مشکلی پیش آمده ...!

) diff --git a/app/UserPanel/(Controller)/ControllerDashboard/error.tsx b/app/UserPanel/(Controller)/ControllerDashboard/error.tsx index 101c38c..c08a21f 100644 --- a/app/UserPanel/(Controller)/ControllerDashboard/error.tsx +++ b/app/UserPanel/(Controller)/ControllerDashboard/error.tsx @@ -1,6 +1,6 @@ 'use client' // Error components must be Client Components -import { useEffect } from 'react' +// import { useEffect } from 'react' export default function Error({ error, @@ -9,21 +9,20 @@ export default function Error({ error: Error & { digest?: string } reset: () => void }) { - useEffect(() => { - // Log the error to an error reporting service - console.error(error) - }, [error]) + // useEffect(() => { + // // Log the error to an error reporting service + // console.error(error) + // }, [error]) return ( -
-

Something went wrong!

+
+

مشکلی پیش آمده ...!

) diff --git a/app/error.tsx b/app/error.tsx new file mode 100644 index 0000000..c08a21f --- /dev/null +++ b/app/error.tsx @@ -0,0 +1,29 @@ +'use client' // Error components must be Client Components + +// import { useEffect } from 'react' + +export default function Error({ + error, + reset, +}: { + error: Error & { digest?: string } + reset: () => void +}) { + // useEffect(() => { + // // Log the error to an error reporting service + // console.error(error) + // }, [error]) + + return ( +
+

مشکلی پیش آمده ...!

+ +
+ ) +} \ No newline at end of file