chore: remove unneeded props from AuthContainer and make its usages cleaner (#19191)

* refactor AuthContainer by removing app-dir related props

* fix
This commit is contained in:
Benny Joo authored and GitHub committed 2025-02-12 05:19:16 -05:00
1 parent 207804bd97
commit 4f226cd653
6 files changed
+4 -17

No files matched your search

@@ -73,11 +73,7 @@ export default function Page({ requestId, isRequestExpired, csrfToken }: PagePro
};
return (
<AuthContainer
showLogo
title={t("reset_password")}
description={t("change_your_password")}
heading={!success ? t("reset_password") : undefined}>
<AuthContainer showLogo heading={!success ? t("reset_password") : undefined}>
{isRequestExpired && <Expired />}
{!isRequestExpired && !success && (
<>
@@ -89,9 +89,7 @@ export default function ForgotPassword(props: PageProps) {
return (
<AuthContainer
showLogo
title={!success ? t("forgot_password") : t("reset_link_sent")}
heading={!success ? t("forgot_password") : t("reset_link_sent")}
description={t("request_password_reset")}
footerText={
!success && (
<>
-3
View File
@@ -182,9 +182,6 @@ PageProps & WithNonceProps<{}>) {
return (
<div className="dark:bg-brand dark:text-brand-contrast text-emphasis min-h-screen [--cal-brand-emphasis:#101010] [--cal-brand-subtle:#9CA3AF] [--cal-brand-text:white] [--cal-brand:#111827] dark:[--cal-brand-emphasis:#e1e1e1] dark:[--cal-brand-text:black] dark:[--cal-brand:white]">
<AuthContainer
isAppDir
title={t("login")}
description={t("login")}
showLogo
heading={twoFactorRequired ? t("2fa_code") : t("welcome_back")}
footerText={
+1 -1
View File
@@ -41,7 +41,7 @@ export function Logout(props: PageProps) {
};
return (
<AuthContainer title={t("logged_out")} description={t("youve_been_logged_out")} showLogo isAppDir>
<AuthContainer showLogo>
<div className="mb-4">
<div className="bg-success mx-auto flex h-12 w-12 items-center justify-center rounded-full">
<Icon name="check" className="h-6 w-6 text-green-600" />