fix: booker atoms using next/router (#14612)
* fix: booker OOO using next/router * fixup! fix: booker OOO using next/router
This commit is contained in:
@@ -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 (
|
||||
<div>
|
||||
<OAuthClientForm clientId={clientId} />
|
||||
|
||||
@@ -3,6 +3,7 @@ import * as HoverCard from "@radix-ui/react-hover-card";
|
||||
import { AnimatePresence, m } from "framer-motion";
|
||||
import { useCallback, useState } from "react";
|
||||
|
||||
import { useIsPlatform } from "@calcom/atoms/monorepo";
|
||||
import type { IOutOfOfficeData } from "@calcom/core/getUserAvailability";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { OutOfOfficeInSlots } from "@calcom/features/bookings/Booker/components/OutOfOfficeInSlots";
|
||||
@@ -255,8 +256,10 @@ interface IOOOSlotProps {
|
||||
}
|
||||
|
||||
const OOOSlot: React.FC<IOOOSlotProps> = (props) => {
|
||||
const isPlatform = useIsPlatform();
|
||||
const { fromUser, toUser, reason, emoji, time, className = "" } = props;
|
||||
|
||||
if (isPlatform) return <></>;
|
||||
return (
|
||||
<OutOfOfficeInSlots
|
||||
fromUser={fromUser}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"type": "module",
|
||||
"description": "Customizable UI components to integrate scheduling into your product.",
|
||||
"authors": "Cal.com, Inc.",
|
||||
"version": "1.0.22",
|
||||
"version": "1.0.23",
|
||||
"scripts": {
|
||||
"dev": "yarn vite build --watch & npx tailwindcss -i ./globals.css -o ./globals.min.css --postcss --minify --watch",
|
||||
"build": "yarn vite build && npx tailwindcss -i ./globals.css -o ./globals.min.css --postcss --minify",
|
||||
|
||||
@@ -2,7 +2,8 @@ import { Navbar } from "@/components/Navbar";
|
||||
import { CheckCircle2Icon } from "lucide-react";
|
||||
import { X } from "lucide-react";
|
||||
import { Inter } from "next/font/google";
|
||||
import { useRouter } from "next/navigation";
|
||||
// eslint-disable-next-line @calcom/eslint/deprecated-imports-next-router
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import { useGetBooking, useCancelBooking } from "@calcom/atoms";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Navbar } from "@/components/Navbar";
|
||||
import { Inter } from "next/font/google";
|
||||
import { useRouter } from "next/navigation";
|
||||
// eslint-disable-next-line @calcom/eslint/deprecated-imports-next-router
|
||||
import { useRouter } from "next/router";
|
||||
import { useState } from "react";
|
||||
|
||||
import { Booker, useEventTypesPublic } from "@calcom/atoms";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Navbar } from "@/components/Navbar";
|
||||
import { Inter } from "next/font/google";
|
||||
import { useRouter } from "next/navigation";
|
||||
// eslint-disable-next-line @calcom/eslint/deprecated-imports-next-router
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import { useGetBookings } from "@calcom/atoms";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
|
||||
Reference in New Issue
Block a user