diff --git a/frontend/app/[locale]/(search)/layout.tsx b/frontend/app/[locale]/(search)/layout.tsx index 8593c35a..c7ae78b7 100644 --- a/frontend/app/[locale]/(search)/layout.tsx +++ b/frontend/app/[locale]/(search)/layout.tsx @@ -7,10 +7,6 @@ interface MarketingLayoutProps { children: React.ReactNode; } -const Featurebase = dynamic(() => import('@/components/featurebase'), { - loading: () => <>, -}); - const OneTapComponent = dynamic(() => import('@/components/google-one-tap'), { loading: () => <>, }); @@ -29,7 +25,6 @@ export default async function MarketingLayout({ children }: MarketingLayoutProps
{!user && } - {user && }
diff --git a/frontend/components/featurebase.tsx b/frontend/components/featurebase.tsx deleted file mode 100644 index 1e5c1827..00000000 --- a/frontend/components/featurebase.tsx +++ /dev/null @@ -1,68 +0,0 @@ -'use client'; -import { useEffect } from 'react'; -import Script from 'next/script'; -import { User } from 'next-auth'; - -interface FeaturebaseProps { - user: User; -} - -const Featurebase = ({ user }: FeaturebaseProps) => { - useEffect(() => { - if (!user) { - return; - } - const win = window as any; - - if (typeof win.Featurebase !== 'function') { - win.Featurebase = function () { - // eslint-disable-next-line prefer-rest-params - (win.Featurebase.q = win.Featurebase.q || []).push(arguments); - }; - } - win.Featurebase( - 'identify', - { - organization: 'memfree', - email: user.email, - name: user.name, - id: user.email, - profilePicture: user.image, - }, - (err) => { - if (err) { - console.error(err); - } else { - // console.log("Data sent successfully!"); - } - }, - ); - }, [user]); - - useEffect(() => { - const win = window as any; - - if (typeof win.Featurebase !== 'function') { - win.Featurebase = function () { - // eslint-disable-next-line prefer-rest-params - (win.Featurebase.q = win.Featurebase.q || []).push(arguments); - }; - } - win.Featurebase('initialize_changelog_widget', { - organization: 'memfree', // Replace this with your featurebase organization name - placement: 'top', // Choose between right, left, top, bottom placement (Optional if fullscreenPopup is enabled) - theme: 'light', // Choose between dark or light theme - fullscreenPopup: true, // Optional - Open a fullscreen announcement of the new feature to the user - locale: 'en', - }); - }, []); - - return ( - <> -