From 2013328213ee48210b0ed24922b9b1267b7d414c Mon Sep 17 00:00:00 2001 From: Sasha Mysak Date: Thu, 11 Jan 2024 19:18:59 +0100 Subject: [PATCH] fix: convention --- apps/web/app/future/auth/sso/[provider]/page.tsx | 9 +++++++++ apps/web/app/future/auth/sso/direct/page.tsx | 11 +++++++++++ apps/web/app/future/auth/verify/page.tsx | 2 +- apps/web/pages/auth/verify.tsx | 2 +- .../lib/{ => auth}/verify/getServerSideProps.tsx | 0 5 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 apps/web/app/future/auth/sso/[provider]/page.tsx create mode 100644 apps/web/app/future/auth/sso/direct/page.tsx rename apps/web/server/lib/{ => auth}/verify/getServerSideProps.tsx (100%) diff --git a/apps/web/app/future/auth/sso/[provider]/page.tsx b/apps/web/app/future/auth/sso/[provider]/page.tsx new file mode 100644 index 00000000000000..a049b6001e7e16 --- /dev/null +++ b/apps/web/app/future/auth/sso/[provider]/page.tsx @@ -0,0 +1,9 @@ +import Provider from "@pages/auth/sso/[provider]"; +import { withAppDir } from "app/AppDirSSRHOC"; +import { WithLayout } from "app/layoutHOC"; + +export default WithLayout({ + getLayout: null, + Page: Provider, + getData: withAppDir(getServerSideProps), +})<"P">; diff --git a/apps/web/app/future/auth/sso/direct/page.tsx b/apps/web/app/future/auth/sso/direct/page.tsx new file mode 100644 index 00000000000000..b20914cd1bf43f --- /dev/null +++ b/apps/web/app/future/auth/sso/direct/page.tsx @@ -0,0 +1,11 @@ +import DirectSSOLogin from "@pages/auth/sso/direct"; +import { WithLayout } from "app/layoutHOC"; + +import { getFuturePageProps } from "@server/lib/getFuturePageProps"; +import { getSSODirectData } from "@server/lib/ssoDirectGetData"; + +export default WithLayout({ + getLayout: null, + Page: DirectSSOLogin, + getData: (ctx) => getFuturePageProps(ctx, getSSODirectData), +})<"P">; diff --git a/apps/web/app/future/auth/verify/page.tsx b/apps/web/app/future/auth/verify/page.tsx index 44d4888a4b43b4..3f982c46438d57 100644 --- a/apps/web/app/future/auth/verify/page.tsx +++ b/apps/web/app/future/auth/verify/page.tsx @@ -2,7 +2,7 @@ import VerifyPage from "@pages/auth/verify"; import { withAppDir } from "app/AppDirSSRHOC"; import { WithLayout } from "app/layoutHOC"; -import { getServerSideProps } from "@server/lib/verify/getServerSideProps"; +import { getServerSideProps } from "@server/lib/auth/verify/getServerSideProps"; export default WithLayout({ getLayout: null, diff --git a/apps/web/pages/auth/verify.tsx b/apps/web/pages/auth/verify.tsx index e551b3f283bca9..ae1100409e6127 100644 --- a/apps/web/pages/auth/verify.tsx +++ b/apps/web/pages/auth/verify.tsx @@ -19,7 +19,7 @@ import { AlertTriangle, ExternalLink, MailOpen } from "@calcom/ui/components/ico import Loader from "@components/Loader"; import PageWrapper from "@components/PageWrapper"; -import { getServerSideProps } from "@server/lib/verify/getServerSideProps"; +import { getServerSideProps } from "@server/lib/auth/verify/getServerSideProps"; async function sendVerificationLogin(email: string, username: string) { await signIn("email", { diff --git a/apps/web/server/lib/verify/getServerSideProps.tsx b/apps/web/server/lib/auth/verify/getServerSideProps.tsx similarity index 100% rename from apps/web/server/lib/verify/getServerSideProps.tsx rename to apps/web/server/lib/auth/verify/getServerSideProps.tsx