From 918f467befd6367fb20e94da1c5b2403d76efc65 Mon Sep 17 00:00:00 2001 From: BasilJohn Date: Sat, 27 Jul 2024 11:45:38 -0600 Subject: [PATCH] Limit artist to 5 --- src/BaseInput.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BaseInput.js b/src/BaseInput.js index b3b298f..3437a81 100644 --- a/src/BaseInput.js +++ b/src/BaseInput.js @@ -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 {