Skip to content

Commit

Permalink
chore: move search to advanced-search
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed May 16, 2023
1 parent ddf8130 commit c43e872
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/customizations/volto/components/theme/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c43e872

Please sign in to comment.