Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Redirect to new info site #1523

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- Redirect to new info site [#1523](https://github.com/open-apparel-registry/open-apparel-registry/pull/1523)

### Changed

### Deprecated
Expand Down
18 changes: 18 additions & 0 deletions src/app/src/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import ClaimFacility from './components/ClaimFacility';
import ClaimedFacilities from './components/ClaimedFacilities';
import SurveyDialogNotification from './components/SurveyDialogNotification';
import Settings from './components/Settings';
import ExternalRedirect from './components/ExternalRedirect';

import { sessionLogin } from './actions/auth';
import { fetchFeatureFlags } from './actions/featureFlags';
Expand All @@ -56,6 +57,8 @@ import {
settingsRoute,
WEB_HEADER_HEIGHT,
MOBILE_HEADER_HEIGHT,
InfoLink,
InfoPaths,
} from './util/constants';

const appStyles = theme =>
Expand Down Expand Up @@ -199,6 +202,21 @@ class Routes extends Component {
path={settingsRoute}
component={Settings}
/>
<Route exact path="/about/processing">
<ExternalRedirect
to={`${InfoLink}/${InfoPaths.dataQuality}`}
/>
</Route>
<Route exact path="/about/claimedfacilities">
<ExternalRedirect
to={`${InfoLink}/${InfoPaths.claimedFacilities}`}
/>
</Route>
<Route exact path="/tos">
<ExternalRedirect
to={`${InfoLink}/${InfoPaths.termsOfUse}`}
/>
</Route>
<Route
exact
path={mainRoute}
Expand Down
6 changes: 6 additions & 0 deletions src/app/src/components/ExternalRedirect.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const ExternalRedirect = ({ to }) => {
window.location.replace(to);
return null;
};

export default ExternalRedirect;