diff --git a/src/common/utils.js b/src/common/utils.js index 5a98e9a4..ad89b2d3 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -1188,7 +1188,8 @@ export const toMapperURL = path => { if(window.location.host.match('app.*.openconceptlab.org')) url = window.location.origin.replace('//app.', '//map.') - let referrerParams = `referrer=${window.location.href}` + // The Mapper reads auth only from the segment after the first '?' in the referrer's hash, so drop this page's own query + let referrerParams = `referrer=${window.location.href.split('?')[0]}` if(isLoggedIn()) referrerParams += '?auth=true' diff --git a/src/components/common/AppsMenu.jsx b/src/components/common/AppsMenu.jsx index d3ceb19a..cb3c6c60 100644 --- a/src/components/common/AppsMenu.jsx +++ b/src/components/common/AppsMenu.jsx @@ -2,9 +2,10 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { useLocation } from 'react-router'; import { Apps as AppsIcon , Web as MetadataBrowserIcon, Publish as ImportsIcon } from '@mui/icons-material'; +import MapperIcon from '@mui/icons-material/MotionPhotosAutoOutlined'; import { Tooltip, IconButton, Box, Typography } from '@mui/material'; import useToggle from '../../hooks/useToggle'; -import { getSiteTitle } from '../../common/utils'; +import { getSiteTitle, toMapperURL } from '../../common/utils'; import PopperGrow from './PopperGrow'; const SITE_TITLE = getSiteTitle() @@ -35,7 +36,7 @@ const AppsMenu = props => { - +
{ @@ -60,6 +61,14 @@ const AppsMenu = props => { } + + + + + OCL
Mapper +
+
+