Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: new subscription

Nevo David10363131e612
diff --git a/apps/frontend/src/components/layout/layout.settings.tsx b/apps/frontend/src/components/layout/layout.settings.tsx
index 831b42b82..b444f2e6e 100644
--- a/apps/frontend/src/components/layout/layout.settings.tsx
+++ b/apps/frontend/src/components/layout/layout.settings.tsx
@@ -31,6 +31,7 @@ import { Impersonate } from '@gitroom/frontend/components/layout/impersonate';
import clsx from 'clsx';
import { BillingComponent } from '@gitroom/frontend/components/billing/billing.component';
import dynamic from 'next/dynamic';
+import { NewSubscription } from '@gitroom/frontend/components/layout/new.subscription';
const ModeComponent = dynamic(
() => import('@gitroom/frontend/components/layout/mode.component'),
{ ssr: false }
@@ -70,7 +71,8 @@ export const LayoutSettings = ({ children }: { children: ReactNode }) => {
<ShowLinkedinCompany />
<Toaster />
<ShowPostSelector />
- {(user.tier !== 'FREE' || !isGeneral() || process.env.isBillingEnabled === "false") && <Onboarding />}
+ <NewSubscription />
+ {user.tier !== 'FREE' && <Onboarding />}
<Support />
<ContinueProvider />
<div className="min-h-[100vh] w-full max-w-[1440px] mx-auto bg-primary px-[12px] text-textColor flex flex-col">
diff --git a/apps/frontend/src/components/layout/new.subscription.tsx b/apps/frontend/src/components/layout/new.subscription.tsx
new file mode 100644
index 000000000..52a812e8a
--- /dev/null
+++ b/apps/frontend/src/components/layout/new.subscription.tsx
@@ -0,0 +1,17 @@
+import { useSearchParams } from 'next/navigation';
+import { useEffect } from 'react';
+import { useFireEvents } from '@gitroom/helpers/utils/use.fire.events';
+
+export const NewSubscription = () =>{
+ const query = useSearchParams();
+ const fireEvents = useFireEvents();
+
+ useEffect(() => {
+ const check = query.get('check');
+ if (check) {
+ fireEvents('purchase');
+ }
+ }, [query]);
+
+ return null;
+}
\ No newline at end of file