Skip to content

Commit

Permalink
Merge pull request #78 from taver-ca/dev
Browse files Browse the repository at this point in the history
Limit artist to 5
  • Loading branch information
sam9116 authored Jul 27, 2024
2 parents ae24972 + 918f467 commit 21dcedf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/BaseInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ const BaseInput = forwardRef(({ setConcerts,

const [artistName, setArtistName] = useState("Taylor Swift");
const submitArtistInfo = async (incomingArtistInfo) => {
console.log(incomingArtistInfo);

if(artistWishlist.length>=5){
alert(`You can have only 5 artists at a time.`)
return
}
let incomingArtistName = incomingArtistInfo.name;
let incomingArtistId = incomingArtistInfo.id
try {
Expand Down

0 comments on commit 21dcedf

Please sign in to comment.