fix: Plain Chat loading in embed (#19348)

* PlainChat has to be on dashboard and not on booking pages

* improve useIsBookingPage

---------

Co-authored-by: hbjORbj <[email protected]>
This commit is contained in:
Hariom BalharaandhbjORbj authored and GitHub committed 2025-02-19 06:40:32 +00:00
1 parent 9a271f397b
commit 25f3368fa1
2 files changed
+9 -4

No files matched your search

+4 -1
View File
@@ -4,13 +4,16 @@ import { TrpcProvider } from "app/_trpc/trpc-provider";
import { SessionProvider } from "next-auth/react";
import CacheProvider from "react-inlinesvg/provider";
import useIsBookingPage from "@lib/hooks/useIsBookingPage";
import PlainChat from "@lib/plain/dynamicProvider";
export function Providers({ children }: { children: React.ReactNode }) {
const isBookingPage = useIsBookingPage();
return (
<SessionProvider>
<TrpcProvider>
<PlainChat />
{!isBookingPage ? <PlainChat /> : null}
{/* @ts-expect-error FIXME remove this comment when upgrading typescript to v5 */}
<CacheProvider>{children}</CacheProvider>
</TrpcProvider>