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

276
Views
Abrir menú en una matriz

Entonces, estoy tratando de abrir un menú, pero el problema es que estoy mostrando que la composición postMenu (Posts.js) es una matriz. Entonces, cuando muestro el menú, aparece en todas las publicaciones.

Posts.comp.js (Donde estoy mostrando el postMenu)

 const dispatch = useDispatch(); const { isLoading, posts, ownerInfo, postsMenuIsOpen } = useSelector( (state) => state.posts ); // other code... {posts && posts.map(({ textfield, image, ownerId }) => ( <div className="px-3 pt-2 pb-1 border border-gray-100 m-1"> <PostsMenu /> {ownerInfo && ownerInfo.map(({ _id, displayname, username, profilePic }) => ( <div> // html code...

PostsMenu.comp.js (donde está el código del menú)

 import React from "react"; import { useSelector } from "react-redux"; function PostsMenu() { const { postsMenuIsOpen } = useSelector((state) => state.posts); return ( <div className={ postsMenuIsOpen ? `absolute w-[70%] bg-red-500 z-50` : `hidden` } > PostsMenu </div> ); } export default PostsMenu;

Por favor, hágamelo saber si necesita más información.

¡Gracias por adelantado!

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!