Skip to content

Commit 1036313

Browse files
author
Nevo David
committed
feat: new subscription
1 parent 8ec8e22 commit 1036313

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

apps/frontend/src/components/layout/layout.settings.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { Impersonate } from '@gitroom/frontend/components/layout/impersonate';
3131
import clsx from 'clsx';
3232
import { BillingComponent } from '@gitroom/frontend/components/billing/billing.component';
3333
import dynamic from 'next/dynamic';
34+
import { NewSubscription } from '@gitroom/frontend/components/layout/new.subscription';
3435
const ModeComponent = dynamic(
3536
() => import('@gitroom/frontend/components/layout/mode.component'),
3637
{ ssr: false }
@@ -70,7 +71,8 @@ export const LayoutSettings = ({ children }: { children: ReactNode }) => {
7071
<ShowLinkedinCompany />
7172
<Toaster />
7273
<ShowPostSelector />
73-
{(user.tier !== 'FREE' || !isGeneral() || process.env.isBillingEnabled === "false") && <Onboarding />}
74+
<NewSubscription />
75+
{user.tier !== 'FREE' && <Onboarding />}
7476
<Support />
7577
<ContinueProvider />
7678
<div className="min-h-[100vh] w-full max-w-[1440px] mx-auto bg-primary px-[12px] text-textColor flex flex-col">
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { useSearchParams } from 'next/navigation';
2+
import { useEffect } from 'react';
3+
import { useFireEvents } from '@gitroom/helpers/utils/use.fire.events';
4+
5+
export const NewSubscription = () =>{
6+
const query = useSearchParams();
7+
const fireEvents = useFireEvents();
8+
9+
useEffect(() => {
10+
const check = query.get('check');
11+
if (check) {
12+
fireEvents('purchase');
13+
}
14+
}, [query]);
15+
16+
return null;
17+
}

0 commit comments

Comments
 (0)