From c43e8720a43557f467758013fc413418d8b1580b Mon Sep 17 00:00:00 2001 From: Andrei Grigore Date: Tue, 16 May 2023 12:43:52 +0200 Subject: [PATCH] chore: move search to advanced-search --- .../volto/components/theme/Header/Header.jsx | 9 ++++++++- src/index.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/customizations/volto/components/theme/Header/Header.jsx b/src/customizations/volto/components/theme/Header/Header.jsx index ac35aca..ef43ff3 100644 --- a/src/customizations/volto/components/theme/Header/Header.jsx +++ b/src/customizations/volto/components/theme/Header/Header.jsx @@ -7,7 +7,7 @@ import React from 'react'; import { Dropdown, Image } from 'semantic-ui-react'; import { connect, useDispatch, useSelector } from 'react-redux'; -import { withRouter } from 'react-router-dom'; +import { withRouter, useLocation } from 'react-router-dom'; import { UniversalLink } from '@plone/volto/components'; import { getBaseUrl, @@ -47,6 +47,12 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => { const isSubsite = subsite?.['@type'] === 'Subsite'; const isHomePath = pathname === '/' || pathname === ''; + // const currentPath = useLocation(); + + //split above console in two consoles + // console.log(pathname, 'pathname'); + // console.log(currentPath, 'routerLocation'); + // console.log(statePath, ' statepath'); const isHomePageInverse = useSelector((state) => { const layout = state.content?.data?.layout; @@ -267,6 +273,7 @@ export default compose( withRouter, connect( (state) => ({ + // statePath: state?.router?.location?.pathname, token: state.userSession.token, items: state.navigation.items, subsite: state.content.data?.['@components']?.subsite, diff --git a/src/index.js b/src/index.js index f7f85b5..e7600a9 100644 --- a/src/index.js +++ b/src/index.js @@ -118,7 +118,7 @@ export default function applyConfig(config) { { isDefault: true, // to replace search path change path to whatever you want and match with the page in volto website - path: '/fisesearch', + path: '/advanced-search', placeholder: 'Search FISE...', description: 'Looking for more information? Try searching the full EEA website content',