From bf67d2ccc60594b0154a88129025e3bccc762315 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 13 Sep 2023 23:18:02 +0200 Subject: [PATCH] restore pathname --- src/components/theme/SearchWidget/SearchWidget.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index e2751c2bf9..e1a403e9fe 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -23,7 +23,6 @@ const messages = defineMessages({ const SearchWidget = (props) => { const intl = useIntl(); const dispatch = useDispatch(); - const location = useLocation(); const [text, setText] = useState(''); const history = useHistory(); @@ -31,7 +30,7 @@ const SearchWidget = (props) => { setText(value); }; - const pathname = location.pathname; + const pathname = props.pathname; const onSubmit = (event) => { const path = pathname?.length > 0 ? `&path=${encodeURIComponent(pathname)}` : '';