change pathnames and readme

This commit is contained in:
ismailsosic
2023-03-09 01:10:06 +01:00
parent 71811fac4b
commit 0a01e536e4
20 changed files with 246 additions and 14 deletions

View File

@@ -8,12 +8,22 @@ const Result = ({result, term}) => {
const [title, setTitle] = useState()
let sentences
<<<<<<< Updated upstream
const checkForMatches = (props) => {
if(props.length !== 1) return sentences.map((sentence) => {
sentence.toLowerCase().includes(term.toLowerCase()) ? setTitle(sentence) : null
})
return setTitle(text)
=======
const checkForMatches = (props) => {
if(props.length === 1) return setTitle(props)
if(props.length > 1){
return sentences.map(sentence => {
if(sentence.toLowerCase().includes(term.toLowerCase())) setTitle(sentence)
})
} else setTitle(props[0])
>>>>>>> Stashed changes
}
@@ -32,7 +42,7 @@ const Result = ({result, term}) => {
return (
<div onClick={() => (router.push({pathname: `/${result._type}/${result._id}`}))} className='
<div onClick={() => (router.push({pathname: `${result._index}/${result._type}/${result._id}`}))} className='
self-end
bg-[#202124]
w-[100%]