From d21c91c51989914e070ee10882467a40d502e836 Mon Sep 17 00:00:00 2001 From: Vijay Date: Wed, 31 Jul 2024 02:50:37 +0530 Subject: [PATCH] fix: #15989 disable country prefill in phone input (#15991) * default country disabled in phone input * Update PhoneInput.tsx * update event-types e2e --------- Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> --- apps/web/playwright/event-types.e2e.ts | 4 ++-- packages/ui/form/PhoneInput.tsx | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/web/playwright/event-types.e2e.ts b/apps/web/playwright/event-types.e2e.ts index f6233590da..621cfcf05a 100644 --- a/apps/web/playwright/event-types.e2e.ts +++ b/apps/web/playwright/event-types.e2e.ts @@ -190,7 +190,7 @@ testBothFutureAndLegacyRoutes.describe("Event Types tests", () => { await gotoBookingPage(page); await selectFirstAvailableTimeSlotNextMonth(page); - await page.locator(`[data-fob-field-name="location"] input`).fill("9199999999"); + await page.locator(`[data-fob-field-name="location"] input`).fill("19199999999"); await bookTimeSlot(page); await expect(page.locator("[data-testid=success-page]")).toBeVisible(); @@ -204,7 +204,7 @@ testBothFutureAndLegacyRoutes.describe("Event Types tests", () => { await page.locator(`text="Organizer Phone Number"`).click(); const locationInputName = "locations[0].hostPhoneNumber"; await page.locator(`input[name="${locationInputName}"]`).waitFor(); - await page.locator(`input[name="${locationInputName}"]`).fill("9199999999"); + await page.locator(`input[name="${locationInputName}"]`).fill("19199999999"); await saveEventType(page); await gotoBookingPage(page); diff --git a/packages/ui/form/PhoneInput.tsx b/packages/ui/form/PhoneInput.tsx index 9d95c803a4..277ef9ea28 100644 --- a/packages/ui/form/PhoneInput.tsx +++ b/packages/ui/form/PhoneInput.tsx @@ -18,13 +18,10 @@ export type PhoneInputProps = { }; function BasePhoneInput({ name, className = "", onChange, value, ...rest }: PhoneInputProps) { - const defaultCountry = useDefaultCountry(); - return (