Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

187
Vistas
Nested mapping in 3 arrays with React

The mapping works so far. The problem I have is that I don't really need the middle array or its return. I want a stack with multiple avatars depending on the number of friends. I currently get everything twice.

enter image description here

  <React.Fragment>
      {eintrag.kalenderEinträge ? (
        eintrag.kalenderEinträge.map((e, i) => {
        var d1 = tag;
        var d2 = Moment(e.datum).format("L");

        if (d1 === d2) {
           return e.freunde?.map((f, i) => {
              return (
                    <Stack
                     spacing={1}
                     sx={{
                     marginTop: 3,
                     backgroundColor: "rgba(39, 187, 245, 0.05)",
                     }}
                     m={2}
                     >
             <Box sx={{ display: "flex" }} p={1}>
               <AvatarGroup max={2}>
                {e.freunde?.map((f, i) => {
                    let img = `data:${f.typ};base64,${f.bild}`;
                       return (
                             <Avatar
                              alt={f.name}
                              src={img}
                              sx={{
                              width: 56,
                              height: 56,
                              }}
                              />
                          );
                      })}
                  </AvatarGroup>

                 ... 

enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda