File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
apps/frontend/src/components/layout Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import { Impersonate } from '@gitroom/frontend/components/layout/impersonate';
3131import clsx from 'clsx' ;
3232import { BillingComponent } from '@gitroom/frontend/components/billing/billing.component' ;
3333import dynamic from 'next/dynamic' ;
34+ import { NewSubscription } from '@gitroom/frontend/components/layout/new.subscription' ;
3435const 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" >
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments