Skip to content

Commit

Permalink
cr(validatore): added redirect from old to new route
Browse files Browse the repository at this point in the history
  • Loading branch information
VincenzoDeSisto committed Sep 11, 2024
1 parent a0fb7dd commit f256e98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/layout/Main/Main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Route, Routes } from "react-router-dom";
import { Navigate, Route, Routes } from "react-router-dom";
import NotFound from "../NotFound/NotFound";
import SearchPage from "../../search/SearchPage/SearchPage";
import AssetDetailsPage from "../../semantic-assets/DetailsPage/AssetDetailsPage";
Expand All @@ -15,7 +15,8 @@ import {
ERROR_PAGE,
NEWERROR_PAGE,
LEGALNOTICES,
CONTACT
CONTACT,
OLD_VALIDATORE
} from "../../../services/routes";
import ExplorePage from "../../explore/ExplorePage/ExplorePage";
import FaqPage from "../../static-content/faq/FaqPage/FaqPage";
Expand Down Expand Up @@ -52,6 +53,10 @@ const Main = ({ childRef }) => (
/>
<Route path={FAQ_URL} element={<FaqPage />} />
<Route path={PROJECT_URL} element={<ProjectPage />} />
<Route
path={OLD_VALIDATORE}
element={<Navigate to={`../${VALIDATORE}`} replace />}
/>
<Route path={VALIDATORE}>
<Route index element={<Validatore />} />
<Route path="risultato" element={<ValidatoreResult />} />
Expand Down
1 change: 1 addition & 0 deletions src/services/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const GITHUB_SCHEMA =
export const SEARCH_BASE_URL = "search";
export const FAQ_URL = "faq";
export const PROJECT_URL = "iniziativa";
export const OLD_VALIDATORE = "validatore";
export const VALIDATORE = "validatore_metadati";
export const DIGITALE_DOCS_URL =
"https://teamdigitale.github.io/dati-semantic-guida-ndc-docs/";
Expand Down

0 comments on commit f256e98

Please sign in to comment.