Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cr(validatore): added redirect from old to new route #568

Merged
merged 1 commit into from
Sep 11, 2024
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
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
Loading