mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-03-02 12:52:02 +00:00
* refactor: card title and layout tweaks * chore: review comments * refactor: update domain warning screen
36 lines
880 B
TypeScript
36 lines
880 B
TypeScript
import {
|
|
Card,
|
|
CardDescription,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
import { useTranslation } from "react-i18next";
|
|
import { useLocation } from "react-router";
|
|
|
|
export const ErrorPage = () => {
|
|
const { t } = useTranslation();
|
|
const { search } = useLocation();
|
|
const searchParams = new URLSearchParams(search);
|
|
const error = searchParams.get("error") ?? "";
|
|
|
|
return (
|
|
<Card>
|
|
<CardHeader className="gap-1.5">
|
|
<CardTitle className="text-xl">{t("errorTitle")}</CardTitle>
|
|
<CardDescription className="flex flex-col gap-3">
|
|
{error ? (
|
|
<>
|
|
<p>{t("errorSubtitleInfo")}</p>
|
|
<pre>{error}</pre>
|
|
</>
|
|
) : (
|
|
<>
|
|
<p>{t("errorSubtitle")}</p>
|
|
</>
|
|
)}
|
|
</CardDescription>
|
|
</CardHeader>
|
|
</Card>
|
|
);
|
|
};
|