Skip to content

Commit

Permalink
fix: onboarding widget configuration (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik authored Mar 19, 2024
2 parents 6a8b6ab + 7979bf5 commit d92a507
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
9 changes: 9 additions & 0 deletions apps/web/components/common/Support.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Script from 'next/script';
import getConfig from 'next/config';
import Tracker from '@openreplay/tracker';
import { useEffect, useRef } from 'react';
Expand Down Expand Up @@ -59,6 +60,14 @@ export function Support({ profile }: SupportProps) {
ref={twakRef}
/>
) : null}
{publicRuntimeConfig.NEXT_PUBLIC_ONBOARDING_TOKEN && (
<Script
id="usetifulScript"
src="https://www.usetiful.com/dist/usetiful.js"
data-token={publicRuntimeConfig.NEXT_PUBLIC_ONBOARDING_TOKEN}
async
/>
)}
</>
);
}
9 changes: 0 additions & 9 deletions apps/web/layouts/AppLayout/AppLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Head from 'next/head';
import Image from 'next/image';
import Script from 'next/script';
import dynamic from 'next/dynamic';
import { useRouter } from 'next/router';

Expand Down Expand Up @@ -132,14 +131,6 @@ export function AppLayout({ children, pageProps }: PropsWithChildren<{ pageProps
</main>
</div>
<Support profile={profile} />
{process.env.NEXT_PUBLIC_ONBOARDING_TOKEN && (
<Script
id="usetifulScript"
src="https://www.usetiful.com/dist/usetiful.js"
data-token={process.env.NEXT_PUBLIC_ONBOARDING_TOKEN}
async
/>
)}
</>
);
}
1 change: 1 addition & 0 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const nextConfig = {
NEXT_PUBLIC_GTM_ID: process.env.NEXT_PUBLIC_GTM_ID,
NEXT_PUBLIC_OPENREPLAY_KEY: process.env.NEXT_PUBLIC_OPENREPLAY_KEY,
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID: process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID,
NEXT_PUBLIC_ONBOARDING_TOKEN: process.env.NEXT_PUBLIC_ONBOARDING_TOKEN,
},
};

Expand Down

0 comments on commit d92a507

Please sign in to comment.