mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-25 03:09:24 -06:00
28 lines
774 B
TypeScript
28 lines
774 B
TypeScript
"use client";
|
|
|
|
// Error components must be Client components
|
|
import { Button } from "@formbricks/ui/Button";
|
|
import { ErrorComponent } from "@formbricks/ui/ErrorComponent";
|
|
|
|
const Error = ({ error, reset }: { error: Error; reset: () => void }) => {
|
|
if (process.env.NODE_ENV === "development") {
|
|
console.error(error.message);
|
|
}
|
|
|
|
return (
|
|
<div className="flex h-full w-full flex-col items-center justify-center">
|
|
<ErrorComponent />
|
|
<div className="mt-2">
|
|
<Button variant="secondary" onClick={() => reset()} className="mr-2">
|
|
Try again
|
|
</Button>
|
|
<Button variant="darkCTA" onClick={() => (window.location.href = "/")}>
|
|
Go to Dashboard
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Error;
|