mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-13 21:36:03 +00:00
show error
This commit is contained in:
@@ -84,6 +84,7 @@ export default async function Page(props: {
|
||||
userId,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return linkingFailed(branding);
|
||||
}
|
||||
|
||||
@@ -137,6 +138,7 @@ export default async function Page(props: {
|
||||
foundUser.userId,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return linkingFailed(branding);
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,10 @@ import { getLocale, getTranslations } from "next-intl/server";
|
||||
import { Alert, AlertType } from "../../alert";
|
||||
import { DynamicTheme } from "../../dynamic-theme";
|
||||
|
||||
export async function linkingFailed(branding?: BrandingSettings) {
|
||||
export async function linkingFailed(
|
||||
branding?: BrandingSettings,
|
||||
error?: string,
|
||||
) {
|
||||
const locale = getLocale();
|
||||
const t = await getTranslations({ locale, namespace: "idp" });
|
||||
|
||||
@@ -11,13 +14,12 @@ export async function linkingFailed(branding?: BrandingSettings) {
|
||||
<DynamicTheme branding={branding}>
|
||||
<div className="flex flex-col items-center space-y-4">
|
||||
<h1>{t("linkingError.title")}</h1>
|
||||
<p className="ztdl-p">{t("linkingError.description")}</p>
|
||||
{error && (
|
||||
<div className="w-full">
|
||||
{
|
||||
<Alert type={AlertType.ALERT}>
|
||||
{t("linkingError.description")}
|
||||
</Alert>
|
||||
}
|
||||
{<Alert type={AlertType.ALERT}>{error}</Alert>}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</DynamicTheme>
|
||||
);
|
||||
|
Reference in New Issue
Block a user