From fcf2f559bee66117e29a2745252ac18028d2b9df Mon Sep 17 00:00:00 2001 From: Sam Bao Date: Thu, 8 Feb 2024 23:08:35 -0700 Subject: [PATCH] more renovation, forcing artist name search in lower case becasue unable to find some artist on spotify when arrtist name contained upper case --- src/App.js | 4 ++-- src/AuthorizeSpotify.js | 10 +++++++- src/BaseInput.js | 39 +++++++++++++++++++------------ src/SharePageList.js | 2 +- src/YourFavoriteSpotifyArtists.js | 28 +++++++++++++++------- 5 files changed, 56 insertions(+), 27 deletions(-) diff --git a/src/App.js b/src/App.js index 787264b..cc8485f 100644 --- a/src/App.js +++ b/src/App.js @@ -48,7 +48,7 @@ function App() { className="App-header" container spacing={2}> - + Taver @@ -64,7 +64,7 @@ function App() { - + diff --git a/src/AuthorizeSpotify.js b/src/AuthorizeSpotify.js index 7076948..b016701 100644 --- a/src/AuthorizeSpotify.js +++ b/src/AuthorizeSpotify.js @@ -1,3 +1,4 @@ +import { Button } from "@mui/material"; function AuthorizeSpotify() { @@ -38,7 +39,14 @@ function AuthorizeSpotify() { return (

Authorize Spotify:

- +
); } diff --git a/src/BaseInput.js b/src/BaseInput.js index 081ad05..29ec435 100644 --- a/src/BaseInput.js +++ b/src/BaseInput.js @@ -1,6 +1,6 @@ import { useState, forwardRef, useImperativeHandle, useEffect } from "react"; import * as React from 'react'; -import { TextField, Button, Stack } from '@mui/material'; +import { TextField, Button, Stack, FormControl, InputLabel, NativeSelect } from '@mui/material'; const mapStyles = [ { mapId: "1fc21c527f198d4e", displayName: "Default Theme", buttonColorCss: "0070d2" }, @@ -62,7 +62,7 @@ const BaseInput = forwardRef(({ setConcerts, setUserLocation, setMapStyle, start "content-type": "application/json;charset=utf-8", }, body: JSON.stringify({ - artistName: incomingArtistName, + artistName: incomingArtistName.toLowerCase(), startDate: startDate, endDate: endDate }), @@ -147,9 +147,6 @@ const BaseInput = forwardRef(({ setConcerts, setUserLocation, setMapStyle, start value={artistName} onChange={(e) => setArtistName(e.target.value)} /> )} + ); }