diff options
| author | real-zephex <[email protected]> | 2024-03-28 10:02:17 +0530 |
|---|---|---|
| committer | real-zephex <[email protected]> | 2024-03-28 10:02:17 +0530 |
| commit | c447e8fde220e36bfe7b22e11a95d5d857d83ba5 (patch) | |
| tree | bdf729dbc795cdb989b11ece13ff2d9a00b77e16 /src/app/error.jsx | |
| parent | fixes: minor css fixes, added loading indicators, added error pages etc etc (diff) | |
| download | dramalama-c447e8fde220e36bfe7b22e11a95d5d857d83ba5.tar.xz dramalama-c447e8fde220e36bfe7b22e11a95d5d857d83ba5.zip | |
fixes: css improvements and UI redesign for manga info page
Diffstat (limited to 'src/app/error.jsx')
| -rw-r--r-- | src/app/error.jsx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/app/error.jsx b/src/app/error.jsx new file mode 100644 index 0000000..fabcb0c --- /dev/null +++ b/src/app/error.jsx @@ -0,0 +1,24 @@ +"use client"; // Error components must be Client Components + +import { useEffect } from "react"; +import "./globals.css"; + +export default function Error({ error, reset }) { + useEffect(() => { + console.log(error); + }, [error]); + + return ( + <div className="ErrorContainer"> + <p>Something went wrong!</p> + <button + onClick={ + // Attempt to recover by trying to re-render the segment + () => reset() + } + > + Try again + </button> + </div> + ); +} |