Search bar no hace search y correccion de bug en makelink
This commit is contained in:
@@ -10,12 +10,16 @@ import {Nav} from "./components/Nav";
|
||||
|
||||
import {BrowserRouter, Switch, Route} from "react-router-dom";
|
||||
|
||||
const Main = (props) => (
|
||||
<Fragment>
|
||||
<h1>Busca la musica que te gusta!</h1>
|
||||
<SearchBar history={props.history}/>
|
||||
</Fragment>
|
||||
)
|
||||
const Main = (props) => {
|
||||
const navigate = (query) => props.history.push(`/search?query=${query}`);
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<h1>Busca la musica que te gusta!</h1>
|
||||
<SearchBar history={props.history} onQueryChanged={navigate}/>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
|
||||
const NoRoute = (props) => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user