Skip to content

Commit

Permalink
Merge pull request #82 from taver-ca/dev-artist-gig-count
Browse files Browse the repository at this point in the history
add gig count to artist choice list
  • Loading branch information
sam9116 authored Jul 27, 2024
2 parents 6012043 + 07fb528 commit 52eb428
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
45 changes: 24 additions & 21 deletions src/ArtistChoiceList.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
import React from 'react';
import { List, ListItem, ListItemButton, ListItemAvatar, ListItemText, Avatar } from '@mui/material';

const ArtistChoiceList = ({ artists, onArtistClick}) => {
return (
<List>
{artists.map((artist, index) => (
<ListItem key={index}>
<ListItemButton onClick={() => onArtistClick(artist)}>
<ListItemAvatar>
<Avatar
alt={`${artist.name}`}
src={`${artist.images[1].url}`}
/>
</ListItemAvatar>
<ListItemText
primary={`${artist.name}`}
></ListItemText>
</ListItemButton>
</ListItem>
))}
</List>
);
const ArtistChoiceList = ({ artists, onArtistClick }) => {
const text = { color: 'red' }
return (
<List>
{artists.map((artist, index) => (
<ListItem key={index}>
<ListItemButton onClick={() => onArtistClick(artist)}>
<ListItemAvatar>
<Avatar
alt={`${artist.name}`}
src={`${artist.images[1].url}`}
/>
</ListItemAvatar>
<ListItemText

primary={`${artist.name}`}
secondary={`${artist.gigCount} Gig(s)`}
secondaryTypographyProps={{ style: text }}
></ListItemText>
</ListItemButton>
</ListItem>
))}
</List>
);
};

export default ArtistChoiceList;

2 changes: 1 addition & 1 deletion src/ConcertList.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class ConcertList extends React.Component {
this.props.artistWishlist.filter(
(artistWishlistItem) => {
return (
artistWishlistItem.WishlistArtistId !=
artistWishlistItem.WishlistArtistId !==
concert.artistId
);
}
Expand Down

0 comments on commit 52eb428

Please sign in to comment.