Estoy tratando de obtener 2 matrices separadas para poder mostrarlas, preferiblemente en una sola tarjeta.
Aquí está mi código actual que intenta obtenerlos en 2 tarjetas separadas que estarán una al lado de la otra, pero se mostrará la segunda array.map
TypeError no detectado: segmentData.map(...) no es una función
Idealmente, me gustaría combinar la información de ambas matrices en una sola tarjeta.
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> ))) ); };