diff --git a/docs/components/Navigation/Navigation.tsx b/docs/components/Navigation/Navigation.tsx index 16b223a0..32d2e73d 100644 --- a/docs/components/Navigation/Navigation.tsx +++ b/docs/components/Navigation/Navigation.tsx @@ -5,7 +5,7 @@ import Link from 'next/link'; import { Extension } from '../../constants/extension'; import { useRouter } from 'next/router'; import { Searchbox } from '../Page/Searchbox'; -import { publicUrl } from '../../lib/publicUrl'; +import { isProduction } from '../../helpers/isProduction'; export interface INavigationProps {} @@ -15,7 +15,7 @@ export const Navigation: React.FunctionComponent = (props: Rea return ( <> { - process.env.NEXT_PUBLIC_VERCEL_ENV !== 'production' ? ( + !isProduction() ? (
You are currently viewing the BETA version of Front Matter documentation. Click on the banner to go to the main release documentation. diff --git a/docs/components/Page/CTA.tsx b/docs/components/Page/CTA.tsx index 393b6612..c2e09407 100644 --- a/docs/components/Page/CTA.tsx +++ b/docs/components/Page/CTA.tsx @@ -24,8 +24,8 @@ export const CTA: React.FunctionComponent = (props: React.PropsWithCh
- - {isProduction ? strings(`cta_button_primary`) : strings(`cta_button_beta_primary`)} + + {isProduction() ? strings(`cta_button_primary`) : strings(`cta_button_beta_primary`)} {strings(`cta_button_secondary`)} diff --git a/docs/helpers/isProduction.ts b/docs/helpers/isProduction.ts index c04ae2bb..6d01c490 100644 --- a/docs/helpers/isProduction.ts +++ b/docs/helpers/isProduction.ts @@ -1,3 +1,3 @@ -export const isProduction = process.env.NODE_ENV === 'production'; \ No newline at end of file +export const isProduction = () => process.env.NEXT_PUBLIC_VERCEL_ENV === 'production'; \ No newline at end of file