From 651ffc711ac63cb331f3bafefa6eac201ed39377 Mon Sep 17 00:00:00 2001 From: jasquat Date: Fri, 17 Feb 2023 14:35:13 -0500 Subject: [PATCH] added ability to display the environment in the frontend header bar w/ burnettk --- .../src/components/NavigationBar.tsx | 8 ++++- spiffworkflow-frontend/src/config.tsx | 29 +++++++++++++++---- spiffworkflow-frontend/src/index.css | 15 ++++++++++ 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/spiffworkflow-frontend/src/components/NavigationBar.tsx b/spiffworkflow-frontend/src/components/NavigationBar.tsx index e482ae52..b1ed09a4 100644 --- a/spiffworkflow-frontend/src/components/NavigationBar.tsx +++ b/spiffworkflow-frontend/src/components/NavigationBar.tsx @@ -25,6 +25,7 @@ import { useUriListForPermissions } from '../hooks/UriListForPermissions'; import { PermissionsToCheck } from '../interfaces'; import { usePermissionFetcher } from '../hooks/PermissionService'; import { UnauthenticatedError } from '../services/HttpService'; +import { SPIFF_ENVIRONMENT } from '../config'; // for ref: https://react-bootstrap.github.io/components/navbar/ export default function NavigationBar() { @@ -80,7 +81,12 @@ export default function NavigationBar() { if (UserService.isLoggedIn()) { return ( <> - + {SPIFF_ENVIRONMENT ? ( + + {SPIFF_ENVIRONMENT} + + ) : null} + {UserService.getPreferredUsername()}