feat: new subscription
This commit is contained in:
parent
8ec8e225eb
commit
10363131e6
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
Loading…
Reference in New Issue