From f66e6930573a5baf9f5fa8aac69b645ab2016e95 Mon Sep 17 00:00:00 2001 From: Elizabeth Salita Date: Tue, 4 May 2021 13:45:53 -0400 Subject: [PATCH] Fixed menu mapping in prod --- .../sharedComponents/header/NavBar.jsx | 4 +-- .../header/mobile/MobileNav.jsx | 4 +-- src/js/dataMapping/navigation/menuOptions.jsx | 36 +------------------ 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/src/js/components/sharedComponents/header/NavBar.jsx b/src/js/components/sharedComponents/header/NavBar.jsx index e52db1610c..ecd76ac0cc 100644 --- a/src/js/components/sharedComponents/header/NavBar.jsx +++ b/src/js/components/sharedComponents/header/NavBar.jsx @@ -6,7 +6,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faEnvelope } from "@fortawesome/free-regular-svg-icons"; import Analytics from 'helpers/analytics/Analytics'; -import { searchOptions, profileOptions, downloadGlobalNavigationOptions, resourceOptions } from 'dataMapping/navigation/menuOptions'; +import { searchOptions, profileOptions, downloadOptions, resourceOptions } from 'dataMapping/navigation/menuOptions'; import EmailSignUp from 'components/homepage/EmailSignUp'; import { DEV } from '../../../GlobalConstants'; @@ -184,7 +184,7 @@ export default class NavBar extends React.Component { + items={downloadOptions} />

  • diff --git a/src/js/dataMapping/navigation/menuOptions.jsx b/src/js/dataMapping/navigation/menuOptions.jsx index 985ecf0f60..e09c35deb4 100644 --- a/src/js/dataMapping/navigation/menuOptions.jsx +++ b/src/js/dataMapping/navigation/menuOptions.jsx @@ -5,14 +5,7 @@ import GlobalConstants from 'GlobalConstants'; -const { - QAT, - DEV, - FILES_SERVER_BASE_URL, - API -} = GlobalConstants; - -const isLowerEnv = (QAT || DEV); +const { FILES_SERVER_BASE_URL } = GlobalConstants; export const searchOptions = [ { @@ -97,8 +90,6 @@ export const resourceOptions = [ } ]; -const underResourcesInLowerEnv = ["api", "data dictionary"]; - export const downloadOptions = [ { label: 'Award Data Archive', @@ -155,28 +146,6 @@ export const downloadOptions = [ enabled: true, internalDomain: true }, - { - label: 'API', - type: '', - url: API.replace("api/", ""), - code: 'api', - description: 'An automated way for advanced users to access all the data behind USAspending.gov. Accessible documentation includes tutorials, best practices, and more.', - callToAction: 'Explore Our API', - shouldOpenNewTab: true, - enabled: true, - internalDomain: true - }, - { - label: 'Data Dictionary', - type: 'data-dictionary', - url: '/data-dictionary', - code: 'dictionary', - description: '', - callToAction: 'Explore the Data Dictionary', - shouldOpenNewTab: false, - enabled: true, - externalLink: false - }, { label: 'Dataset Metadata', type: 'dataset_metadata', @@ -189,6 +158,3 @@ export const downloadOptions = [ externalLink: false } ]; - -export const downloadGlobalNavigationOptions = downloadOptions - .filter(({ label }) => !(isLowerEnv && underResourcesInLowerEnv.includes(label.toLowerCase())));