Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
data-portal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICAT
data-portal
Commits
4672727c
Commit
4672727c
authored
1 month ago
by
Marjolaine Bodin
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Handle old data portal route"
parent
58091e4a
No related branches found
No related tags found
1 merge request
!722
Resolve "Handle old data portal route"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/portal/src/routes.tsx
+22
-3
22 additions, 3 deletions
apps/portal/src/routes.tsx
with
22 additions
and
3 deletions
apps/portal/src/routes.tsx
+
22
−
3
View file @
4672727c
import
{
Loading
}
from
'
@edata-portal/core
'
;
import
{
Loading
,
usePath
}
from
'
@edata-portal/core
'
;
import
React
,
{
Suspense
}
from
'
react
'
;
import
{
InstrumentPage
}
from
'
components/instrument/InstrumentPage
'
;
import
{
RemoteComponent
}
from
'
components/RemoteComponent
'
;
import
type
{
RouteObject
}
from
'
react-router-dom
'
;
import
{
Navigate
,
type
RouteObject
}
from
'
react-router-dom
'
;
import
{
AdminPage
}
from
'
components/admin/AdminPage
'
;
import
{
DatasetBreadcrumbItem
,
...
...
@@ -104,6 +104,12 @@ const DOIPage = React.lazy(() => import('components/doi/DOIPage'));
const
DOIInfo
=
React
.
lazy
(()
=>
import
(
'
components/doi/DOIInfo
'
));
const
DOIDatasets
=
React
.
lazy
(()
=>
import
(
'
components/doi/DOIDatasets
'
));
const
PublicDOIRedirect
=
()
=>
{
const
doiPrefix
=
usePath
(
'
doiPrefix
'
);
const
doiSuffix
=
usePath
(
'
doiSuffix
'
);
return
<
Navigate
to
=
{
`/doi/
${
doiPrefix
}
/
${
doiSuffix
}
`
}
replace
/>;
};
export
const
routes
:
RouteObject
[]
=
[
{
path
:
'
/
'
,
...
...
@@ -532,7 +538,20 @@ export const routes: RouteObject[] = [
},
],
},
{
path
:
'
public
'
,
children
:
[
{
index
:
true
,
element
:
<
NotFound
/>,
},
{
path
:
'
:doiPrefix/:doiSuffix
'
,
id
:
'
publicdoi
'
,
element
:
<
PublicDOIRedirect
/>,
},
],
},
{
path
:
'
/addresses
'
,
element
:
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment