mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-22 09:07:45 +00:00
rm redundant language providers
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import { Boundary } from "@/components/boundary";
|
import { Boundary } from "@/components/boundary";
|
||||||
import { Button } from "@/components/button";
|
import { Button } from "@/components/button";
|
||||||
import { LanguageProvider } from "@/components/language-provider";
|
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
|
||||||
@@ -14,17 +13,15 @@ export default function Error({ error, reset }: any) {
|
|||||||
const t = useTranslations("error");
|
const t = useTranslations("error");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LanguageProvider>
|
<Boundary labels={["Login Error"]} color="red">
|
||||||
<Boundary labels={["Login Error"]} color="red">
|
<div className="space-y-4">
|
||||||
<div className="space-y-4">
|
<div className="text-sm text-red-500 dark:text-red-500">
|
||||||
<div className="text-sm text-red-500 dark:text-red-500">
|
<strong className="font-bold">Error:</strong> {error?.message}
|
||||||
<strong className="font-bold">Error:</strong> {error?.message}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Button onClick={() => reset()}>{t("tryagain")}</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Boundary>
|
<div>
|
||||||
</LanguageProvider>
|
<Button onClick={() => reset()}>{t("tryagain")}</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Boundary>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
import { LanguageProvider } from "@/components/language-provider";
|
|
||||||
import { BrandingSettings } from "@zitadel/proto/zitadel/settings/v2/branding_settings_pb";
|
import { BrandingSettings } from "@zitadel/proto/zitadel/settings/v2/branding_settings_pb";
|
||||||
import { getLocale, getTranslations } from "next-intl/server";
|
import { getLocale, getTranslations } from "next-intl/server";
|
||||||
import { Alert, AlertType } from "../../alert";
|
import { Alert, AlertType } from "../../alert";
|
||||||
@@ -9,19 +8,17 @@ export async function linkingFailed(branding?: BrandingSettings) {
|
|||||||
const t = await getTranslations({ locale, namespace: "idp" });
|
const t = await getTranslations({ locale, namespace: "idp" });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LanguageProvider>
|
<DynamicTheme branding={branding}>
|
||||||
<DynamicTheme branding={branding}>
|
<div className="flex flex-col items-center space-y-4">
|
||||||
<div className="flex flex-col items-center space-y-4">
|
<h1>{t("linkingError.title")}</h1>
|
||||||
<h1>{t("linkingError.title")}</h1>
|
<div className="w-full">
|
||||||
<div className="w-full">
|
{
|
||||||
{
|
<Alert type={AlertType.ALERT}>
|
||||||
<Alert type={AlertType.ALERT}>
|
{t("linkingError.description")}
|
||||||
{t("linkingError.description")}
|
</Alert>
|
||||||
</Alert>
|
}
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</DynamicTheme>
|
</div>
|
||||||
</LanguageProvider>
|
</DynamicTheme>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
import { LanguageProvider } from "@/components/language-provider";
|
|
||||||
import { BrandingSettings } from "@zitadel/proto/zitadel/settings/v2/branding_settings_pb";
|
import { BrandingSettings } from "@zitadel/proto/zitadel/settings/v2/branding_settings_pb";
|
||||||
import { getLocale, getTranslations } from "next-intl/server";
|
import { getLocale, getTranslations } from "next-intl/server";
|
||||||
import { Alert, AlertType } from "../../alert";
|
import { Alert, AlertType } from "../../alert";
|
||||||
@@ -12,18 +11,16 @@ export async function loginFailed(
|
|||||||
const t = await getTranslations({ locale, namespace: "idp" });
|
const t = await getTranslations({ locale, namespace: "idp" });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LanguageProvider>
|
<DynamicTheme branding={branding}>
|
||||||
<DynamicTheme branding={branding}>
|
<div className="flex flex-col items-center space-y-4">
|
||||||
<div className="flex flex-col items-center space-y-4">
|
<h1>{t("loginError.title")}</h1>
|
||||||
<h1>{t("loginError.title")}</h1>
|
<p className="ztdl-p">{t("loginError.description")}</p>
|
||||||
<p className="ztdl-p">{t("loginError.description")}</p>
|
{error && (
|
||||||
{error && (
|
<div className="w-full">
|
||||||
<div className="w-full">
|
{<Alert type={AlertType.ALERT}>{error}</Alert>}
|
||||||
{<Alert type={AlertType.ALERT}>{error}</Alert>}
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
</div>
|
||||||
</div>
|
</DynamicTheme>
|
||||||
</DynamicTheme>
|
|
||||||
</LanguageProvider>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
import { LanguageProvider } from "@/components/language-provider";
|
|
||||||
import { BrandingSettings } from "@zitadel/proto/zitadel/settings/v2/branding_settings_pb";
|
import { BrandingSettings } from "@zitadel/proto/zitadel/settings/v2/branding_settings_pb";
|
||||||
import { getLocale, getTranslations } from "next-intl/server";
|
import { getLocale, getTranslations } from "next-intl/server";
|
||||||
import { DynamicTheme } from "../../dynamic-theme";
|
import { DynamicTheme } from "../../dynamic-theme";
|
||||||
@@ -14,19 +13,17 @@ export async function loginSuccess(
|
|||||||
const t = await getTranslations({ locale, namespace: "idp" });
|
const t = await getTranslations({ locale, namespace: "idp" });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LanguageProvider>
|
<DynamicTheme branding={branding}>
|
||||||
<DynamicTheme branding={branding}>
|
<div className="flex flex-col items-center space-y-4">
|
||||||
<div className="flex flex-col items-center space-y-4">
|
<h1>{t("loginSuccess.title")}</h1>
|
||||||
<h1>{t("loginSuccess.title")}</h1>
|
<p className="ztdl-p">{t("loginSuccess.description")}</p>
|
||||||
<p className="ztdl-p">{t("loginSuccess.description")}</p>
|
|
||||||
|
|
||||||
<IdpSignin
|
<IdpSignin
|
||||||
userId={userId}
|
userId={userId}
|
||||||
idpIntent={idpIntent}
|
idpIntent={idpIntent}
|
||||||
authRequestId={authRequestId}
|
authRequestId={authRequestId}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</DynamicTheme>
|
</DynamicTheme>
|
||||||
</LanguageProvider>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user