diff --git a/package-lock.json b/package-lock.json index c8b8c51..8e2bc0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6446,9 +6446,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001588", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz", - "integrity": "sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==", + "version": "1.0.30001643", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", + "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==", "funding": [ { "type": "opencollective", diff --git a/src/GetSpotifyPlaylistArtistsWithShows.js b/src/GetSpotifyPlaylistArtistsWithShows.js index 109deef..b9adc39 100644 --- a/src/GetSpotifyPlaylistArtistsWithShows.js +++ b/src/GetSpotifyPlaylistArtistsWithShows.js @@ -7,13 +7,10 @@ function GetSpotifyPlaylistArtistsWithShows({ followedArtists, setFollowedArtist let handleSubmit = async (e) => { e.preventDefault(); - - const url = spotifyPlayList; - const urlValidate = new RegExp("^https://open\\.spotify\\.com/playlist/[a-zA-Z0-9]{22}$"); + const urlValidate = new RegExp("^https://open\\.spotify\\.com/playlist/[a-zA-Z0-9]{22}(\\?si=.*)?$"); if (urlValidate.test(spotifyPlayList)) { - - return spotifyPlayList; + setErrorMessage(""); } else { setErrorMessage("Please enter a valid Spotify playlist URL."); @@ -67,11 +64,10 @@ function GetSpotifyPlaylistArtistsWithShows({ followedArtists, setFollowedArtist }} label="Spotify Playlist URL:" value={spotifyPlayList} onChange={(e) => setSpotifyPlaylist(e.target.value)} - - error={Boolean(errorMessage)} - + helperText={errorMessage} + error={errorMessage} /> - {errorMessage && {errorMessage}} +