From d57e29f1e869d679610f41293e3054ef1a82a1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guillois?= Date: Fri, 7 Feb 2020 18:08:09 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Moteur=20de=20recherche=20des=20?= =?UTF-8?q?r=C3=A8gles:=20auto=20s=C3=A9lection=20du=20premier=20r=C3=A9su?= =?UTF-8?q?ltat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/SearchBar.tsx | 14 ++++++++++++-- source/components/SearchButton.tsx | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/source/components/SearchBar.tsx b/source/components/SearchBar.tsx index 1004d8a10..6ae1884fe 100644 --- a/source/components/SearchBar.tsx +++ b/source/components/SearchBar.tsx @@ -4,7 +4,7 @@ import { pick, sortBy, take } from 'ramda' import React, { useContext, useEffect, useState } from 'react' import Highlighter from 'react-highlight-words' import { useTranslation } from 'react-i18next' -import { Link, Redirect } from 'react-router-dom' +import { Link, Redirect, useHistory } from 'react-router-dom' import { Rule } from 'Types/rule' import Worker from 'worker-loader!./SearchBar.worker.js' import { capitalise0 } from '../utils' @@ -29,8 +29,18 @@ export default function SearchBar({ const [selectedOption, setSelectedOption] = useState