mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-30 17:26:24 +02:00
Switch to hook for crisp chat (#418)
This commit is contained in:
parent
9deb45bd33
commit
8c16966907
2 changed files with 4 additions and 11 deletions
|
@ -4,7 +4,6 @@ import "~/style.css";
|
|||
|
||||
import { NextPage } from "next";
|
||||
import { AppProps } from "next/app";
|
||||
import dynamic from "next/dynamic";
|
||||
import Head from "next/head";
|
||||
import { appWithTranslation } from "next-i18next";
|
||||
import PlausibleProvider from "next-plausible";
|
||||
|
@ -13,14 +12,13 @@ import { Toaster } from "react-hot-toast";
|
|||
|
||||
import Maintenance from "@/components/maintenance";
|
||||
|
||||
import { useCrispChat } from "../components/crisp-chat";
|
||||
import { absoluteUrl } from "../utils/absolute-url";
|
||||
import { trpcNext } from "../utils/trpc";
|
||||
|
||||
const CrispChat = dynamic(() => import("@/components/crisp-chat"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
const MyApp: NextPage<AppProps> = ({ Component, pageProps }) => {
|
||||
useCrispChat();
|
||||
|
||||
if (process.env.NEXT_PUBLIC_MAINTENANCE_MODE === "1") {
|
||||
return <Maintenance />;
|
||||
}
|
||||
|
@ -57,7 +55,6 @@ const MyApp: NextPage<AppProps> = ({ Component, pageProps }) => {
|
|||
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
|
||||
/>
|
||||
</Head>
|
||||
<CrispChat />
|
||||
<Toaster />
|
||||
<Component {...pageProps} />
|
||||
</PlausibleProvider>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue