Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): replace Intercom with messenger widget in layouts

Richie McIlroy62f241825bf8
diff --git a/apps/web/app/(org)/layout.tsx b/apps/web/app/(org)/layout.tsx
index 374ace11c..52a01ddab 100644
--- a/apps/web/app/(org)/layout.tsx
+++ b/apps/web/app/(org)/layout.tsx
@@ -1,11 +1,12 @@
+import { buildEnv } from "@cap/env";
import type { PropsWithChildren } from "react";
-import { Intercom } from "../Layout/Intercom";
+import { MessengerWidget } from "../Layout/MessengerWidget";
export default function Layout(props: PropsWithChildren) {
return (
<>
{props.children}
- <Intercom />
+ {buildEnv.NEXT_PUBLIC_IS_CAP === "true" && <MessengerWidget />}
</>
);
}
diff --git a/apps/web/app/(site)/layout.tsx b/apps/web/app/(site)/layout.tsx
index c78e8a5cb..a4a272961 100644
--- a/apps/web/app/(site)/layout.tsx
+++ b/apps/web/app/(site)/layout.tsx
@@ -1,6 +1,7 @@
+import { buildEnv } from "@cap/env";
import type { PropsWithChildren } from "react";
import { formatStarCount, getGitHubStars } from "@/utils/github";
-import { Intercom } from "../Layout/Intercom";
+import { MessengerWidget } from "../Layout/MessengerWidget";
import { Footer } from "./Footer";
import { Navbar } from "./Navbar";
@@ -13,7 +14,7 @@ export default async function Layout(props: PropsWithChildren) {
<Navbar stars={stars} />
{props.children}
<Footer />
- <Intercom />
+ {buildEnv.NEXT_PUBLIC_IS_CAP === "true" && <MessengerWidget />}
</>
);
}