mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-07 17:32:58 +02:00
Updated isProduction function
This commit is contained in:
@@ -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<INavigationProps> = (props: Rea
|
||||
return (
|
||||
<>
|
||||
{
|
||||
process.env.NEXT_PUBLIC_VERCEL_ENV !== 'production' ? (
|
||||
!isProduction() ? (
|
||||
<div className={`bg-yellow-500 text-center py-2 px-4`}>
|
||||
<a href={`https://frontmatter.codes`} title={`Go to main release documentation`} className={`text-base font-medium text-vulcan-500 hover:text-vulcan-900`}>
|
||||
You are currently viewing the BETA version of Front Matter documentation. Click on the banner to go to the main release documentation.
|
||||
|
||||
@@ -24,8 +24,8 @@ export const CTA: React.FunctionComponent<ICTAProps> = (props: React.PropsWithCh
|
||||
|
||||
<div className="mt-10 max-w-sm mx-auto sm:max-w-none">
|
||||
<div className="space-y-4 sm:space-y-0 sm:mx-auto sm:inline-grid sm:grid-cols-2 sm:gap-5">
|
||||
<a href={isProduction ? Extension.installLink : Extension.installBetaLink} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8" rel={`noopener noreferrer`}>
|
||||
{isProduction ? strings(`cta_button_primary`) : strings(`cta_button_beta_primary`)}
|
||||
<a href={isProduction() ? Extension.installLink : Extension.installBetaLink} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8" rel={`noopener noreferrer`}>
|
||||
{isProduction() ? strings(`cta_button_primary`) : strings(`cta_button_beta_primary`)}
|
||||
</a>
|
||||
<a href={`/docs`} title={`Read our documentation`} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-vulcan-500 bg-whisper-500 hover:bg-opacity-70 sm:px-8">
|
||||
{strings(`cta_button_secondary`)}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
|
||||
|
||||
export const isProduction = process.env.NODE_ENV === 'production';
|
||||
export const isProduction = () => process.env.NEXT_PUBLIC_VERCEL_ENV === 'production';
|
||||
Reference in New Issue
Block a user