diff --git a/apps/web/app/(use-page-wrapper)/apps/routing-forms/[...pages]/RoutingFormAuthGuard.tsx b/apps/web/app/(use-page-wrapper)/apps/routing-forms/[...pages]/RoutingFormAuthGuard.tsx index a6bb3b04ad470f..894d0be26a1f3a 100644 --- a/apps/web/app/(use-page-wrapper)/apps/routing-forms/[...pages]/RoutingFormAuthGuard.tsx +++ b/apps/web/app/(use-page-wrapper)/apps/routing-forms/[...pages]/RoutingFormAuthGuard.tsx @@ -1,6 +1,6 @@ "use client"; -import { useRedirectToLoginIfUnauthenticated } from "@calcom/features/auth/lib/hooks/useRedirectToLoginIfUnauthenticated"; +import { useRedirectToLoginIfUnauthenticated } from "@calcom/web/modules/auth/hooks/useRedirectToLoginIfUnauthenticated"; export function RoutingFormAuthGuard({ children }: { children: React.ReactNode }) { useRedirectToLoginIfUnauthenticated(); diff --git a/packages/features/auth/SAMLLogin.tsx b/apps/web/modules/auth/components/SAMLLogin.tsx similarity index 96% rename from packages/features/auth/SAMLLogin.tsx rename to apps/web/modules/auth/components/SAMLLogin.tsx index 98fbbe3724e337..d066baa6830b05 100644 --- a/packages/features/auth/SAMLLogin.tsx +++ b/apps/web/modules/auth/components/SAMLLogin.tsx @@ -3,7 +3,7 @@ import type { Dispatch, SetStateAction } from "react"; import { useFormContext } from "react-hook-form"; import z from "zod"; -import { LastUsed, useLastUsed } from "@calcom/features/auth/lib/hooks/useLastUsed"; +import { LastUsed, useLastUsed } from "../hooks/useLastUsed"; import { HOSTED_CAL_FEATURES } from "@calcom/lib/constants"; import { emailRegex } from "@calcom/lib/emailSchema"; import { useLocale } from "@calcom/lib/hooks/useLocale"; diff --git a/packages/features/auth/Turnstile.tsx b/apps/web/modules/auth/components/Turnstile.tsx similarity index 100% rename from packages/features/auth/Turnstile.tsx rename to apps/web/modules/auth/components/Turnstile.tsx diff --git a/packages/features/auth/lib/hooks/useLastUsed.tsx b/apps/web/modules/auth/hooks/useLastUsed.tsx similarity index 100% rename from packages/features/auth/lib/hooks/useLastUsed.tsx rename to apps/web/modules/auth/hooks/useLastUsed.tsx diff --git a/packages/features/auth/lib/hooks/useRedirectToLoginIfUnauthenticated.tsx b/apps/web/modules/auth/hooks/useRedirectToLoginIfUnauthenticated.tsx similarity index 100% rename from packages/features/auth/lib/hooks/useRedirectToLoginIfUnauthenticated.tsx rename to apps/web/modules/auth/hooks/useRedirectToLoginIfUnauthenticated.tsx diff --git a/packages/features/auth/lib/hooks/useRedirectToOnboardingIfNeeded.tsx b/apps/web/modules/auth/hooks/useRedirectToOnboardingIfNeeded.tsx similarity index 100% rename from packages/features/auth/lib/hooks/useRedirectToOnboardingIfNeeded.tsx rename to apps/web/modules/auth/hooks/useRedirectToOnboardingIfNeeded.tsx diff --git a/apps/web/modules/auth/login-view.tsx b/apps/web/modules/auth/login-view.tsx index 768ae060284d2a..52d675f4fa6859 100644 --- a/apps/web/modules/auth/login-view.tsx +++ b/apps/web/modules/auth/login-view.tsx @@ -9,9 +9,9 @@ import { useEffect, useState } from "react"; import { FormProvider, useForm } from "react-hook-form"; import { z } from "zod"; -import { SAMLLogin } from "@calcom/features/auth/SAMLLogin"; +import { SAMLLogin } from "@calcom/web/modules/auth/components/SAMLLogin"; import { ErrorCode } from "@calcom/features/auth/lib/ErrorCode"; -import { LastUsed, useLastUsed } from "@calcom/features/auth/lib/hooks/useLastUsed"; +import { LastUsed, useLastUsed } from "@calcom/web/modules/auth/hooks/useLastUsed"; import { HOSTED_CAL_FEATURES, WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants"; import { emailRegex } from "@calcom/lib/emailSchema"; import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl"; diff --git a/apps/web/modules/bookings/components/Booker.test.tsx b/apps/web/modules/bookings/components/Booker.test.tsx index f0195924c05c7e..751b01b2120660 100644 --- a/apps/web/modules/bookings/components/Booker.test.tsx +++ b/apps/web/modules/bookings/components/Booker.test.tsx @@ -32,7 +32,7 @@ vi.mock("next/navigation", async (importOriginal) => { }); import "@calcom/dayjs/__mocks__"; -import "@calcom/features/auth/Turnstile"; +import "@calcom/web/modules/auth/components/Turnstile"; import { render, screen } from "@calcom/features/bookings/Booker/__tests__/test-utils"; import type { BookerProps, WrappedBookerProps } from "@calcom/features/bookings/Booker/types"; diff --git a/apps/web/modules/bookings/components/Booker.tsx b/apps/web/modules/bookings/components/Booker.tsx index 6030309f0b3fee..818f4ef014d713 100644 --- a/apps/web/modules/bookings/components/Booker.tsx +++ b/apps/web/modules/bookings/components/Booker.tsx @@ -4,7 +4,7 @@ import { useIsPlatformBookerEmbed } from "@calcom/atoms/hooks/useIsPlatformBooke import dayjs from "@calcom/dayjs"; import { useEmbedUiConfig } from "@calcom/embed-core/embed-iframe"; import { updateEmbedBookerState } from "@calcom/embed-core/src/embed-iframe"; -import TurnstileCaptcha from "@calcom/features/auth/Turnstile"; +import TurnstileCaptcha from "@calcom/web/modules/auth/components/Turnstile"; import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider"; import { useIsQuickAvailabilityCheckFeatureEnabled } from "@calcom/features/bookings/Booker/components/hooks/useIsQuickAvailabilityCheckFeatureEnabled"; import useSkipConfirmStep from "@calcom/features/bookings/Booker/components/hooks/useSkipConfirmStep"; diff --git a/apps/web/modules/shell/Shell.tsx b/apps/web/modules/shell/Shell.tsx index 25221d8d122fb3..c4c111a01f5e7c 100644 --- a/apps/web/modules/shell/Shell.tsx +++ b/apps/web/modules/shell/Shell.tsx @@ -6,8 +6,8 @@ import type { Dispatch, ReactElement, ReactNode, SetStateAction } from "react"; import React, { cloneElement } from "react"; import { Toaster } from "sonner"; -import { useRedirectToLoginIfUnauthenticated } from "@calcom/features/auth/lib/hooks/useRedirectToLoginIfUnauthenticated"; -import { useRedirectToOnboardingIfNeeded } from "@calcom/features/auth/lib/hooks/useRedirectToOnboardingIfNeeded"; +import { useRedirectToLoginIfUnauthenticated } from "@calcom/web/modules/auth/hooks/useRedirectToLoginIfUnauthenticated"; +import { useRedirectToOnboardingIfNeeded } from "@calcom/web/modules/auth/hooks/useRedirectToOnboardingIfNeeded"; import { useFormbricks } from "@calcom/features/formbricks/formbricks-client"; import TimezoneChangeDialog from "@calcom/features/settings/TimezoneChangeDialog"; import { useLocale } from "@calcom/lib/hooks/useLocale"; diff --git a/apps/web/modules/signup-view.tsx b/apps/web/modules/signup-view.tsx index da7f4e3fea7e8f..64cfd9eacf5072 100644 --- a/apps/web/modules/signup-view.tsx +++ b/apps/web/modules/signup-view.tsx @@ -54,7 +54,7 @@ const signupSchema = apiSignupSchema.extend({ cfToken: z.string().optional(), }); -const TurnstileCaptcha = dynamic(() => import("@calcom/features/auth/Turnstile"), { ssr: false }); +const TurnstileCaptcha = dynamic(() => import("@calcom/web/modules/auth/components/Turnstile"), { ssr: false }); type FormValues = z.infer; diff --git a/packages/features/auth/__mocks__/Turnstile.tsx b/packages/features/auth/__mocks__/Turnstile.tsx deleted file mode 100644 index 2543c9ded698c8..00000000000000 --- a/packages/features/auth/__mocks__/Turnstile.tsx +++ /dev/null @@ -1,7 +0,0 @@ -vi.mock("@calcom/features/auth/Turnstile", () => ({ - default: ({ onVerify }: { onVerify: (token: string) => void }) => ( -
onVerify("test-token")}> - Mock Captcha -
- ), -}));