From e694f179ca16ea88eba3232ed78be6a0a3d04ca4 Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Fri, 24 Jun 2022 12:23:45 +0530 Subject: [PATCH] feat: fix remaining env usages to be function calls Signed-off-by: Manan Gupta --- web/vtadmin/src/errors/bugsnag.ts | 2 +- web/vtadmin/src/hooks/useDocumentTitle.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/vtadmin/src/errors/bugsnag.ts b/web/vtadmin/src/errors/bugsnag.ts index 158c3cb7950..378c9948f5b 100644 --- a/web/vtadmin/src/errors/bugsnag.ts +++ b/web/vtadmin/src/errors/bugsnag.ts @@ -17,7 +17,7 @@ import BugsnagJS from '@bugsnag/js'; import { ErrorHandler } from './errorTypes'; import { env } from '../util/env'; -const { REACT_APP_BUGSNAG_API_KEY } = env; +const { REACT_APP_BUGSNAG_API_KEY } = env(); /** * If using Bugsnag, Bugsnag.start() will automatically capture and report diff --git a/web/vtadmin/src/hooks/useDocumentTitle.ts b/web/vtadmin/src/hooks/useDocumentTitle.ts index 43cf0d850a2..93584a39e6c 100644 --- a/web/vtadmin/src/hooks/useDocumentTitle.ts +++ b/web/vtadmin/src/hooks/useDocumentTitle.ts @@ -1,7 +1,7 @@ import { useEffect } from 'react'; import { env } from '../util/env'; -const BASE_TITLE = env.REACT_APP_DOCUMENT_TITLE || 'VTAdmin'; +const BASE_TITLE = env().REACT_APP_DOCUMENT_TITLE || 'VTAdmin'; // useDocumentTitle is a simple hook to set the document.title of the page. //