Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

209
Visualizações
display 2 different arrays in a material ui react card

I am trying to get 2 separate arrays to be able to be displayed, preferably on a single card.

Here is my current code attempting to get them on 2 separate cards that will be next to each other, but the second array.map will show

Uncaught TypeError: segmentData.map(...) is not a function

Ideally I would like to combine the info from both arrays on a single card.

return (
    (segmentData.map((segment) => (
    <Card className={classes.root}>
      <CardActionArea>
        <CardContent>
          <Typography gutterBottom variant="h5" component="h2">
            {segment.flightNumber}
          </Typography>
          <Typography variant="body2" color="textSecondary" component="p">
            This CardContent is wrapped in a CardActionsArea, so this text and
            the above header are wrapped in a ButtonBase, which means they
            behave like a Button.
          </Typography>
        </CardContent>
      </CardActionArea>
    </Card>

    )))

    (pricedItineraryData.map((priced) => (
      <Card className={classes.root}>
        <CardActionArea>
          <CardContent>
            <Typography gutterBottom variant="h5" component="h2">
              {priced.totalFare}
            </Typography>
            <Typography variant="body2" color="textSecondary" component="p">
              This CardContent is wrapped in a CardActionsArea, so this text and
              the above header are wrapped in a ButtonBase, which means they
              behave like a Button.
            </Typography>
          </CardContent>
        </CardActionArea>
      </Card>
      )))
  );
};
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda