change pathnames and readme
This commit is contained in:
@@ -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%]
|
||||
|
||||
Reference in New Issue
Block a user