From 4f226cd653ef3c14b14bb33da0b762e1c74bd197 Mon Sep 17 00:00:00 2001 From: Benny Joo Date: Wed, 12 Feb 2025 10:19:16 +0000 Subject: [PATCH] chore: remove unneeded props from `AuthContainer` and make its usages cleaner (#19191) * refactor AuthContainer by removing app-dir related props * fix --- apps/web/app/(use-page-wrapper)/auth/error/page.tsx | 2 +- apps/web/components/ui/AuthContainer.tsx | 6 +----- .../forgot-password/[id]/forgot-password-single-view.tsx | 6 +----- .../modules/auth/forgot-password/forgot-password-view.tsx | 2 -- apps/web/modules/auth/login-view.tsx | 3 --- apps/web/modules/auth/logout-view.tsx | 2 +- 6 files changed, 4 insertions(+), 17 deletions(-) diff --git a/apps/web/app/(use-page-wrapper)/auth/error/page.tsx b/apps/web/app/(use-page-wrapper)/auth/error/page.tsx index c8803a5d94..e7777b8ced 100644 --- a/apps/web/app/(use-page-wrapper)/auth/error/page.tsx +++ b/apps/web/app/(use-page-wrapper)/auth/error/page.tsx @@ -23,7 +23,7 @@ const ServerPage = async ({ searchParams }: PageProps) => { const { error } = querySchema.parse({ error: searchParams?.error || undefined }); const errorMsg = t("error_during_login") + (error ? ` Error code: ${error}` : ""); return ( - +
diff --git a/apps/web/components/ui/AuthContainer.tsx b/apps/web/components/ui/AuthContainer.tsx index 5063234637..bfb3a936f4 100644 --- a/apps/web/components/ui/AuthContainer.tsx +++ b/apps/web/components/ui/AuthContainer.tsx @@ -1,23 +1,19 @@ import classNames from "classnames"; -import { HeadSeo, Logo } from "@calcom/ui"; +import { Logo } from "@calcom/ui"; import Loader from "@components/Loader"; interface Props { - title: string; - description: string; footerText?: React.ReactNode | string; showLogo?: boolean; heading?: string; loading?: boolean; - isAppDir?: boolean; } export default function AuthContainer(props: React.PropsWithChildren) { return (
- {!props.isAppDir ? : null} {props.showLogo && }
diff --git a/apps/web/modules/auth/forgot-password/[id]/forgot-password-single-view.tsx b/apps/web/modules/auth/forgot-password/[id]/forgot-password-single-view.tsx index 22913533a8..df3e37d7ec 100644 --- a/apps/web/modules/auth/forgot-password/[id]/forgot-password-single-view.tsx +++ b/apps/web/modules/auth/forgot-password/[id]/forgot-password-single-view.tsx @@ -73,11 +73,7 @@ export default function Page({ requestId, isRequestExpired, csrfToken }: PagePro }; return ( - + {isRequestExpired && } {!isRequestExpired && !success && ( <> diff --git a/apps/web/modules/auth/forgot-password/forgot-password-view.tsx b/apps/web/modules/auth/forgot-password/forgot-password-view.tsx index c0342088d4..7ab3e5c7ba 100644 --- a/apps/web/modules/auth/forgot-password/forgot-password-view.tsx +++ b/apps/web/modules/auth/forgot-password/forgot-password-view.tsx @@ -89,9 +89,7 @@ export default function ForgotPassword(props: PageProps) { return ( diff --git a/apps/web/modules/auth/login-view.tsx b/apps/web/modules/auth/login-view.tsx index 9a4b39e609..23e6640081 100644 --- a/apps/web/modules/auth/login-view.tsx +++ b/apps/web/modules/auth/login-view.tsx @@ -182,9 +182,6 @@ PageProps & WithNonceProps<{}>) { return (
+