This commit is contained in:
Michael Fatemi 2021-08-11 20:34:25 -04:00
commit 7cd5323ff7
2 changed files with 4 additions and 4 deletions

View File

@ -30,9 +30,9 @@ export default function ActiveCarpools() {
>
<h1 style={{ textAlign: 'center' }}>Carpools</h1>
<UISecondaryBox style={{ width: '100%', boxSizing: 'border-box' }}>
{activeCarpools.map((carpool) => (
{activeCarpools.length > 0 ? activeCarpools.map((carpool) => (
<ActiveCarpoolListItem carpool={carpool} key={carpool.id} />
))}
)) : "No Carpools"}
</UISecondaryBox>
</div>
);

View File

@ -145,13 +145,13 @@ export default function Carpools() {
Click <EmojiPeopleIcon style={{ fontSize: '0.875rem' }} /> to request to
join a carpool.
</span>
{event.carpools.map((carpool) => (
{event.carpools.length>0 ? event.carpools.map((carpool) => (
<CarpoolRow
carpool={carpool}
key={carpool.id}
inCarpoolAlready={alreadyInCarpool}
/>
))}
)) : "No Carpools"}
</div>
);
}