Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

chore(web): remove unused BentoScript integration

Richie McIlroy2f624a6d46c4
diff --git a/apps/web/components/BentoScript.tsx b/apps/web/components/BentoScript.tsx
deleted file mode 100644
index 627012734..000000000
--- a/apps/web/components/BentoScript.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-"use client";
-
-import type { users } from "@cap/database/schema";
-import { usePathname } from "next/navigation";
-import Script from "next/script";
-import { useEffect } from "react";
-
-declare global {
- interface Window {
- bento?: any;
- }
-}
-
-export function BentoScript({
- user,
-}: {
- user?: typeof users.$inferSelect | null;
-}) {
- const _pathname = usePathname();
-
- useEffect(() => {
- if (window.bento !== undefined) {
- if (user) {
- window.bento.identify(user.email);
- }
- window.bento.view();
- }
- }, [user]);
-
- return (
- <Script
- id="bento-script"
- src={
- "https://fast.bentonow.com?site_uuid=7d5c45ace4c02e5587c4449b1f0efb5c"
- }
- strategy="afterInteractive"
- />
- );
-}
diff --git a/apps/web/components/pages/HomePage/Header.tsx b/apps/web/components/pages/HomePage/Header.tsx
index e0c87724a..74a5a415e 100644
--- a/apps/web/components/pages/HomePage/Header.tsx
+++ b/apps/web/components/pages/HomePage/Header.tsx
@@ -146,9 +146,6 @@ const Header = ({ serverHomepageCopyVariant = "" }: HeaderProps) => {
const result = await sendDownloadLink(email);
if (result.success) {
setEmailStatus("sent");
- if (typeof window !== "undefined" && window.bento) {
- window.bento.identify(email);
- }
} else {
setEmailStatus("error");
setEmailError(result.error ?? "Something went wrong.");