diff --git a/src/SearchBar.tsx b/src/SearchBar.tsx
index 41f58a0..a112720 100644
--- a/src/SearchBar.tsx
+++ b/src/SearchBar.tsx
@@ -19,7 +19,7 @@ const SearchButtonMic = (props: any) => (
{...props} /> :
-)
+);
export const SearchBar: React.FC = () => {
const { t } = useTranslation();
@@ -40,7 +40,9 @@ export const SearchBar: React.FC = () => {
event.preventDefault();
setHitsVisible(false);
const searchUrl = createSearchUrl();
- history.push(searchUrl);
+ if(searchUrl !== history.location.pathname) {
+ history.push(searchUrl);
+ }
};
const handleFocus = () => {
@@ -74,7 +76,7 @@ export const SearchBar: React.FC = () => {
onClick={() => handleFocus()}
/>
) : null
- )
+ );
const Hit = ({ hit }: any) => {
return (