I've been told that this problem it's because i might be having this tag <> </>
inside the map function, and that is the main reason for the error, but this is not the case and i'm still having this problem, let me show
Now, let me show some code
<SearchResults>
{results === "" ? (
<NoSearch>No hay búsquedas recientes</NoSearch>
) : (
<>
{filteredUsers.length > 0 ? (
<>
{filteredUsers.map(user => {
return (
<DisplayUsers
key={user.id}
whileHover={{
backgroundColor: "rgba(0, 0, 0, 0.08)",
borderRadius: "1.2rem"
}}
>
<DisplayPhoto>
{user.perfil ? (
<img src={user.perfil} alt="" />
) : (
<DefaultUser
style={{
width: "38px",
height: "38px",
borderRadius: "50%"
}}
/>
)}
</DisplayPhoto>
<DisplayName>
<h2>{user.name}</h2>
{/* <p>Amig@</p> */}
</DisplayName>
</DisplayUsers>
);
})}
</>
) : (
<NoSearch>No hay resultados</NoSearch>
)}
</>
)}
</SearchResults>
If i put the key in the main container, why am i still having this problem ?
If you can help me, you're the greatest, thanks !!