Files
formbricks/apps/web/app/error.tsx
Dhruwang Jariwala 9f6c40fd42 Rewrite Billing page to React Server Components and new type system (#701)
* Moved billing page to RSC

* removed unused props

* ran pnpm format

* fix build error

* add 404 page, throw 404 on billing page when !IS_FORMBRICKS_CLOUD

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-08-24 11:45:02 +02:00

25 lines
636 B
TypeScript

"use client"; // Error components must be Client components
import { Button, ErrorComponent } from "@formbricks/ui";
export default function Error({ error, reset }: { error: Error; reset: () => void }) {
if (process.env.NODE_ENV === "development") {
console.log(error);
}
return (
<div className="flex h-full w-full flex-col items-center justify-center">
<ErrorComponent />
<Button
variant="secondary"
onClick={
// Attempt to recover by trying to re-render the segment
() => reset()
}
className="mt-2">
Try again
</Button>
</div>
);
}