Files
tinyauth/frontend/src/pages/error-page.tsx
Stavros d0e39c6149 refactor: card title and layout tweaks (#675)
* refactor: card title and layout tweaks

* chore: review comments

* refactor: update domain warning screen
2026-03-01 13:36:43 +02:00

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>
);
};