From 9df0164e378d4a5e26f41777f060864d9e8a3da5 Mon Sep 17 00:00:00 2001 From: Tai Wilkin-Corraggio Date: Wed, 3 Nov 2021 11:23:42 -0400 Subject: [PATCH] Correct info site routes Adds the info site routes as constants in the constants file, instead of using their string value directly. This allows us to update the links in one place in order to keep them consistent and avoid outdated links around the site. Updates the info links throughout the site to use the constant values. Updates the info site routes to use the most current version of the URLs. --- CHANGELOG.md | 2 + src/app/src/components/Contribute.jsx | 11 +- .../src/components/CookiePreferencesText.jsx | 14 ++- src/app/src/components/EmbeddedFooter.jsx | 7 +- src/app/src/components/EmbeddedMapConfig.jsx | 7 +- .../components/EmbeddedMapUnauthorized.jsx | 6 +- src/app/src/components/FacilityListItems.jsx | 3 +- .../src/components/FilterSidebarGuideTab.jsx | 6 +- src/app/src/components/Footer.jsx | 48 +------- src/app/src/components/Navbar.jsx | 4 +- .../src/components/Navbar/MainMobileNav.jsx | 8 +- src/app/src/util/constants.js | 103 ++++++++++++++---- 12 files changed, 131 insertions(+), 88 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2701f8d99..48ea0a111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed +- Correct info site routes [#1520](https://github.com/open-apparel-registry/open-apparel-registry/pull/1520) + ### Security ## [51] 2021-11-04 diff --git a/src/app/src/components/Contribute.jsx b/src/app/src/components/Contribute.jsx index 14f03c534..456686531 100644 --- a/src/app/src/components/Contribute.jsx +++ b/src/app/src/components/Contribute.jsx @@ -10,7 +10,12 @@ import AppGrid from './AppGrid'; import AppOverflow from './AppOverflow'; import ContributeForm from './ContributeForm'; -import { listsRoute, authLoginFormRoute, InfoLink } from '../util/constants'; +import { + listsRoute, + authLoginFormRoute, + InfoLink, + InfoPaths, +} from '../util/constants'; function ContributeList({ userHasSignedIn, fetchingSessionSignIn }) { if (fetchingSessionSignIn) { @@ -51,7 +56,7 @@ function ContributeList({ userHasSignedIn, fetchingSessionSignIn }) {

@@ -84,7 +89,7 @@ function ContributeList({ userHasSignedIn, fetchingSessionSignIn }) { uploaded, you will receive an email letting you know{' '} diff --git a/src/app/src/components/CookiePreferencesText.jsx b/src/app/src/components/CookiePreferencesText.jsx index b5ba5db3e..ae949b3e9 100644 --- a/src/app/src/components/CookiePreferencesText.jsx +++ b/src/app/src/components/CookiePreferencesText.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { InfoLink } from '../util/constants'; +import { InfoLink, InfoPaths } from '../util/constants'; const CookiePreferencesText = () => (

@@ -7,11 +7,19 @@ const CookiePreferencesText = () => ( performance and usage. By clicking the Accept button, you agree to allow us to place cookies and share information with Google Analytics. For more information, please visit our{' '} - + Terms of Use {' '} and{' '} - + Privacy Policy . diff --git a/src/app/src/components/EmbeddedFooter.jsx b/src/app/src/components/EmbeddedFooter.jsx index e3e9609c9..ffdf1c14a 100644 --- a/src/app/src/components/EmbeddedFooter.jsx +++ b/src/app/src/components/EmbeddedFooter.jsx @@ -1,13 +1,10 @@ import React from 'react'; import logo from '../styles/images/OAR_PoweredBy_white.svg'; +import { InfoLink } from '../util/constants'; const EmbeddedFooter = () => (