From c87749cbda0e72cab3f71db12f4e3b718bbed55e Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Tue, 28 May 2024 15:11:54 +0530 Subject: [PATCH] fix: build errors --- web/lib/posthog-provider.tsx | 4 +++- yarn.lock | 9 +-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/web/lib/posthog-provider.tsx b/web/lib/posthog-provider.tsx index 6a5bcbaaf..d1a7ed542 100644 --- a/web/lib/posthog-provider.tsx +++ b/web/lib/posthog-provider.tsx @@ -75,7 +75,9 @@ const PostHogProvider: FC = (props) => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - if (posthogAPIKey) return {children}; + if (process.env.NEXT_PUBLIC_POSTHOG_KEY && process.env.NEXT_PUBLIC_POSTHOG_HOST) + return {children}; + return <>{children}; }; diff --git a/yarn.lock b/yarn.lock index 6dc79bf9b..b807736a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4612,7 +4612,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^18.2.42", "@types/react@^18.2.48": +"@types/react@*", "@types/react@18.2.48", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^18.2.42", "@types/react@^18.2.48": version "18.2.48" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.48.tgz#11df5664642d0bd879c1f58bc1d37205b064e8f1" integrity sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w== @@ -9226,13 +9226,6 @@ lib0@^0.2.42, lib0@^0.2.74, lib0@^0.2.85, lib0@^0.2.86: dependencies: isomorphic.js "^0.2.4" -lie@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" - integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== - dependencies: - immediate "~3.0.5" - lilconfig@3.1.1, lilconfig@^3.0.0, lilconfig@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.1.tgz#9d8a246fa753106cfc205fd2d77042faca56e5e3"