diff options
| author | zephex <[email protected]> | 2024-04-20 13:34:53 +0530 |
|---|---|---|
| committer | zephex <[email protected]> | 2024-04-20 13:34:53 +0530 |
| commit | d6780cf3dad729c69a102ba2940188cf1e6bcbf4 (patch) | |
| tree | d10a2aefef6664c42439f165c73722c514b032bc /src/app/error.jsx | |
| parent | feature added: tracker for mangas (diff) | |
| download | dramalama-d6780cf3dad729c69a102ba2940188cf1e6bcbf4.tar.xz dramalama-d6780cf3dad729c69a102ba2940188cf1e6bcbf4.zip | |
idk whats happening
Diffstat (limited to 'src/app/error.jsx')
| -rw-r--r-- | src/app/error.jsx | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/app/error.jsx b/src/app/error.jsx index 7060187..7549925 100644 --- a/src/app/error.jsx +++ b/src/app/error.jsx @@ -1,24 +1,24 @@ -"use client"; // Error components must be Client Components - -import { useEffect } from "react"; -import styles from "./globals.module.css"; - -export default function Error({ error, reset }) { - useEffect(() => { - console.log(error); - }, [error]); - - return ( - <div className={styles.ErrorContainer}> - <p>Something went wrong!</p> - <button - onClick={ - // Attempt to recover by trying to re-render the segment - () => reset() - } - > - Try again - </button> - </div> - ); -} +"use client"; // Error components must be Client Components
+
+import { useEffect } from "react";
+import styles from "./globals.module.css";
+
+export default function Error({ error, reset }) {
+ useEffect(() => {
+ console.log(error);
+ }, [error]);
+
+ return (
+ <div className={styles.ErrorContainer}>
+ <p>Something went wrong!</p>
+ <button
+ onClick={
+ // Attempt to recover by trying to re-render the segment
+ () => reset()
+ }
+ >
+ Try again
+ </button>
+ </div>
+ );
+}
|