aboutsummaryrefslogtreecommitdiff
path: root/src/app/error.jsx
blob: 348050b6a760653fbb1896d2af84697976eb88fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"use client"; // Error components must be Client Components

import { useEffect } from "react";
import { Button } from "@nextui-org/react";

export default function Error({ error, reset }) {
	useEffect(() => {
		console.log(error);
	}, [error]);

	return (
		<div className="w-screen h-screen flex items-center flex-col justify-center">
			<p>Something went wrong!</p>
			<Button color="primary" onClick={() => reset()}>
				Try again
			</Button>
		</div>
	);
}