Files
zitadel/apps/login/src/app/(login)/[locale]/error.tsx

25 lines
656 B
TypeScript
Raw Normal View History

2023-04-27 13:23:13 +02:00
"use client";
2023-04-03 13:39:51 +02:00
2024-09-26 22:50:55 -04:00
import { Boundary } from "@/components/boundary";
import { Button } from "@/components/button";
import { useEffect } from "react";
2023-04-03 13:39:51 +02:00
export default function Error({ error, reset }: any) {
2024-09-26 22:50:55 -04:00
useEffect(() => {
2023-04-27 13:23:13 +02:00
console.log("logging error:", error);
2023-04-03 13:39:51 +02:00
}, [error]);
return (
2023-06-21 14:06:19 +02:00
<Boundary labels={["Login Error"]} color="red">
2023-04-03 13:39:51 +02:00
<div className="space-y-4">
2023-05-24 14:56:06 +02:00
<div className="text-sm text-red-500 dark:text-red-500">
2023-04-03 13:39:51 +02:00
<strong className="font-bold">Error:</strong> {error?.message}
</div>
<div>
<Button onClick={() => reset()}>Try Again</Button>
</div>
</div>
</Boundary>
);
}