I don't want to display same format datetimes after map
. Do you guys know any ideas to get rid of same YYYY- MM-DD ddd
from results view here?
<Body>
<Title>Choose Datetimes</Title>
{eventType.availableDatetimes.map(d => (
<styles.ListItem key={String(d)} onClick={() => onClick(d)}>
<TouchRipple>
<styles.StyledCard selected={Number(d) === Number(selectedDate)}>
{d.format('YYYY-MM-DD ddd')}
</styles.StyledCard>
</TouchRipple>
</styles.ListItem>
))}
</Body>
I want to join the group same Datetimes here. I want to change from:
2018-10-14 sun
2018-10-14 sun
2018-10-14 sun
2018-10-14 sun
2018-10-15 mon
2018-10-15 mon
2018-10-15 mon
to:
2018-10-14 sun
2018-10-15 mon