Skip to content

Commit fdd52cd

Browse files
committed
Undo last change
1 parent f687fbf commit fdd52cd

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

src/App.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,14 @@ function App() {
5151
songAudioFeatures={songAudioFeatures}
5252
setAudioFeatures={setAudioFeatures}
5353
setSongInfo={setSongInfo}
54-
setFoundFeatures={setFoundFeatures}
5554
/>
5655
) : (
5756
""
5857
)}
5958

6059
{songInfo ? <RenderSong song={songInfo} /> : ""}
6160

62-
{foundFeatures ? (
61+
{songInfo ? (
6362
<SongFilter
6463
logInToken={logInToken}
6564
songInfo={songInfo}

src/components/song-info-search.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import handleSearchTrack from "../util/handle-search-track"
33
// import getRecommendations from "../util/get-recommendations.js"
44
import getSongProperties from "../util/get-song-properties.js"
55

6-
function SongInfoSearch({ logInToken, songInfo, setSongInfo, songAudioFeatures, setAudioFeatures, setFoundFeatures }) {
6+
function SongInfoSearch({ logInToken, songInfo, setSongInfo, songAudioFeatures, setAudioFeatures }) {
77
const [trackSearch, setTrackSearch] = React.useState({
88
trackSearchValue: "",
99
artistSearchValue: "",
@@ -28,7 +28,7 @@ function SongInfoSearch({ logInToken, songInfo, setSongInfo, songAudioFeatures,
2828
}
2929

3030
return (
31-
<form onSubmit={(event) => handleSearchTrack(event, trackSearch, token, setSongInfo, songInfo, songAudioFeatures, setAudioFeatures, setFoundFeatures)}
31+
<form onSubmit={(event) => handleSearchTrack(event, trackSearch, token, setSongInfo, songInfo, songAudioFeatures, setAudioFeatures)}
3232
>
3333
<fieldset>
3434
<legend>Search Bar</legend>

src/util/get-song-properties.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function getSongProperties(songInfo, songAudioFeatures, setAudioFeatures, authToken, setFoundFeatures){
1+
function getSongProperties(songInfo, songAudioFeatures, setAudioFeatures, authToken){
22

33
const requestOptions = {
44
method: "GET",
@@ -24,7 +24,6 @@ function getSongProperties(songInfo, songAudioFeatures, setAudioFeatures, authTo
2424
// newAudioFeatures.time_signature = res.time_signature.toPrecision(1);
2525
newAudioFeatures.danceability = res.danceability.toPrecision(1);
2626
setAudioFeatures(newAudioFeatures);
27-
setFoundFeatures(true)
2827
})
2928
.catch(err => console.error(err))
3029
}

src/util/handle-search-track.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default function handleSearchTrack(
77
setSongInfo,
88
songInfo,
99
songAudioFeatures,
10-
setAudioFeatures,
11-
setFoundFeatures
10+
setAudioFeatures
1211
) {
1312
event.preventDefault();
1413

@@ -52,7 +51,7 @@ export default function handleSearchTrack(
5251
});
5352
})
5453
.then((data) => {
55-
getSongProperties(songInfo, songAudioFeatures, setAudioFeatures, token, setFoundFeatures)
54+
getSongProperties(songInfo, songAudioFeatures, setAudioFeatures, token)
5655
})
5756
.catch((error) => console.error(error));
5857
}

0 commit comments

Comments
 (0)