From a0f59dda606ed7cdaddb900e3efb0c9813b39200 Mon Sep 17 00:00:00 2001 From: kjxbyz Date: Mon, 30 Oct 2023 20:20:22 +0800 Subject: [PATCH] fix: update env --- docs/.env.example | 1 + docs/components/shared/cookie-banner.tsx | 2 ++ docs/components/shared/google-analytics.tsx | 2 ++ docs/next.config.js | 1 + docs/process.d.ts | 1 + 5 files changed, 7 insertions(+) diff --git a/docs/.env.example b/docs/.env.example index b0aac9af..66c4934e 100644 --- a/docs/.env.example +++ b/docs/.env.example @@ -5,3 +5,4 @@ NEXT_PUBLIC_GOOGLE_ID= NEXT_PUBLIC_GH_TOKEN= NEXT_PUBLIC_GH_REPO_OWNER= NEXT_PUBLIC_GH_REPO= +NEXT_PUBLIC_COOKIE_BANNER_ID= diff --git a/docs/components/shared/cookie-banner.tsx b/docs/components/shared/cookie-banner.tsx index 0e2839a6..c32b762f 100644 --- a/docs/components/shared/cookie-banner.tsx +++ b/docs/components/shared/cookie-banner.tsx @@ -5,6 +5,8 @@ import { LngProps } from "@/i18next-lng"; const CookieBanner = (props: LngProps) => { const NEXT_PUBLIC_COOKIE_BANNER_ID = process.env.NEXT_PUBLIC_COOKIE_BANNER_ID; + if (!NEXT_PUBLIC_COOKIE_BANNER_ID) return null; + return ( <>