diff --git a/mon-entreprise/source/components/SearchBar.tsx b/mon-entreprise/source/components/SearchBar.tsx
index 4438385de..244adc76c 100644
--- a/mon-entreprise/source/components/SearchBar.tsx
+++ b/mon-entreprise/source/components/SearchBar.tsx
@@ -119,7 +119,7 @@ export default function SearchBar({ rules, showDefaultList }: SearchBarProps) {
setInput(input)
}}
/>
- {!!input.length && !showDefaultList && !results.length ? (
+ {!!input.length && !results.length ? (
- {(showDefaultList && !results.length
- ? searchIndex.map(item => ({ item, matches: [] }))
+ {(showDefaultList && !results.length && !input.length
+ ? searchIndex
+ .filter(item => item.espace.length === 2)
+ .map(item => ({ item, matches: [] }))
: results
)
- .slice(0, 6)
+ .slice(0, showDefaultList ? 100 : 6)
.map(({ item, matches }) => (
{item.espace
@@ -166,8 +172,8 @@ export default function SearchBar({ rules, showDefaultList }: SearchBarProps) {
›{' '}
))}
- {' '}
-
+
+
{highlightMatches(
item.title,
matches.filter(m => m.key === 'title')
diff --git a/mon-entreprise/source/sites/mon-entreprise.fr/pages/Documentation.tsx b/mon-entreprise/source/sites/mon-entreprise.fr/pages/Documentation.tsx
index 41a8958ae..99e8222ce 100644
--- a/mon-entreprise/source/sites/mon-entreprise.fr/pages/Documentation.tsx
+++ b/mon-entreprise/source/sites/mon-entreprise.fr/pages/Documentation.tsx
@@ -10,6 +10,7 @@ import { Trans, useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
import { Redirect, useLocation } from 'react-router-dom'
import { RootState } from 'Reducers/rootReducer'
+import SearchBar from 'Components/SearchBar'
export default function RulePage() {
const currentSimulation = useSelector(
@@ -24,6 +25,9 @@ export default function RulePage() {
)
const { i18n } = useTranslation()
+ if (pathname === '/documentation') {
+ return
+ }
if (!documentationSitePaths[pathname]) {
return
}
@@ -63,3 +67,15 @@ function BackToSimulation() {
)
}
+
+function DocumentationLanding({ rules }) {
+ return (
+ <>
+
+ Documentation
+
+ Explorez toutes les règles de la documentation
+
+ >
+ )
+}