From e3e464abfaa98bb854008be29439139987b14589 Mon Sep 17 00:00:00 2001 From: Morgan <33722304+ThyMinimalDev@users.noreply.github.com> Date: Tue, 16 Apr 2024 21:37:24 +0300 Subject: [PATCH] fix: booker atoms using next/router (#14612) * fix: booker OOO using next/router * fixup! fix: booker OOO using next/router --- .../organizations/platform/oauth-clients/create.tsx | 6 +++--- packages/features/bookings/components/AvailableTimes.tsx | 3 +++ packages/platform/atoms/package.json | 2 +- packages/platform/examples/base/src/pages/[bookingUid].tsx | 3 ++- packages/platform/examples/base/src/pages/booking.tsx | 3 ++- packages/platform/examples/base/src/pages/bookings.tsx | 3 ++- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/web/pages/settings/organizations/platform/oauth-clients/create.tsx b/apps/web/pages/settings/organizations/platform/oauth-clients/create.tsx index 842c72b60c..3d26f40440 100644 --- a/apps/web/pages/settings/organizations/platform/oauth-clients/create.tsx +++ b/apps/web/pages/settings/organizations/platform/oauth-clients/create.tsx @@ -1,14 +1,14 @@ -import { useRouter } from "next/router"; import React from "react"; import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout"; +import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import PageWrapper from "@components/PageWrapper"; import { OAuthClientForm } from "@components/settings/organizations/platform/oauth-clients/OAuthClientForm"; export const CreateOAuthClient = () => { - const router = useRouter(); - const clientId = router.query.clientId as string | undefined; + const searchParams = useCompatSearchParams(); + const clientId = searchParams?.get("clientId") || ""; return (