Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
¿Cómo buscar publicaciones con una palabra clave (cadenas de cadenas)?

Estoy tratando de hacer un campo de búsqueda, y ya puedo hacer búsquedas, pero solo devuelve publicaciones que están escritas con el mismo título o son exactamente iguales, lo que no sería interesante, esto sucede en mi condicional si ( query !== post .title && query) return null Lo ideal sería buscar solo una palabra y devolver publicaciones similares, he intentado usar el método include de la siguiente manera if (query !== post.title && query.includes( post.title) && query) devuelve nulo pero alguien no funcionó ¿Me ayudarías?

 {(() => { if (isLoading) return <LoadingBlock /> if (!isLoading && postList.length === 0) return <NoDataWarning text='Nenhuma postagem encontrada.' /> return postList.map((post, index) => { if (query !== post.title && query.includes(post.title) && query) return null //the problem is here return ( <PostContainer position={index}> <PostBanner /> <PostInfoContainer> <span> <AiFillCalendar /> {new Date(post.createdAt).toLocaleDateString()} </span> <span> <FaUserCircle /> {`${post.firstName} ${post.lastName}`} </span> </PostInfoContainer> <PostTitle>{post.title}</PostTitle> </PostContainer> )
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!