Skip to content
Snippets Groups Projects
Commit 97271606 authored by DongHwi Kim's avatar DongHwi Kim
Browse files

search connect 8098

parent 7b0ef64c
No related branches found
No related tags found
No related merge requests found
Pipeline #8417 passed
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -9,12 +9,12 @@ export default function SearchPage({list, onSearch,likes,handleLike,myFavoriteLi
event.preventDefault();
console.log(searchWord);
setSearchWord('');
fetch(`http://itunes.apple.com/search?term=${searchWord}&entity=album`)
.then(r => r.json()).then(r => {
console.log(r);
onSearch(r.results);
fetch(`http://localhost:8098/musicSearch/${searchWord}`,{method:"GET"})
.then(response => response.json()).then(response => {
console.log(response);
onSearch(response.results);
setSearchWord('');
}).catch(e => console.log('error when search musician'));
}).catch(error => console.log('error when search musician'));
}
const handleSearchTextChange = (event) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment