Files
Ivan Rezchikov 628dd6384b
Build and Deploy / test-backend (push) Successful in 1m11s
Build and Deploy / lint-frontend (push) Successful in 21s
Build and Deploy / build-backend (push) Successful in 58s
Build and Deploy / deploy (push) Canceled after 0s
Build and Deploy / build-frontend (push) Canceled after 5m38s
version 1
2026-09-18 00:45:51 +03:00

29 lines
981 B
TypeScript

import Link from "next/link";
import { getTranslations } from "next-intl/server";
import { Button } from "@/components/ui/button";
import Main from "@/components/main";
export default async function OAuthErrorPage({
searchParams,
}: {
searchParams: Promise<{ reason?: string }>;
}) {
const { reason = "auth_failed" } = await searchParams;
const t = await getTranslations("OAuth");
const tc = await getTranslations("Common");
const message = t(reason as never);
return (
<Main>
<div className="flex flex-col gap-4 items-center justify-center min-h-[60vh] text-center">
<h1 className="font-semibold text-xl">{t("title")}</h1>
<p className="text-muted-foreground max-w-md">{message}</p>
<Button nativeButton={false} render={<Link href="/oauth/login" />}>{t("tryAgain")}</Button>
<Button nativeButton={false} variant="ghost" render={<Link href="/" />}>
{tc("close")}
</Button>
</div>
</Main>
);
}