Issue #16: incluyendo ultimas paginas con grid

This commit is contained in:
Daniel Cortes
2020-06-19 19:25:55 -04:00
parent cf7b968911
commit 8f9c4e7952
6 changed files with 100 additions and 104 deletions

View File

@@ -1,5 +1,5 @@
import {BrowserRouter, Switch, Route} from "react-router-dom";
import React, {Fragment} from 'react';
import React from 'react';
import ReactDOM from 'react-dom';
import './styles/reset.css';
@@ -16,25 +16,28 @@ import {DiscView} from "./views/Disc";
import {ReleaseView} from "./views/Release";
import {Recomended} from "./views/Recomended";
import {SongView} from "./views/Song";
import {Grid, RowCol} from './components/Grid';
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}/>
<Recomended/>
</Fragment>
<Grid>
<RowCol><h1>Busca la musica que te gusta!</h1></RowCol>
<RowCol><SearchBar history={props.history} onQueryChanged={navigate}/></RowCol>
<RowCol><Recomended/></RowCol>
</Grid>
)
}
const NoRoute = (props) => {
return (
<div>
<h1>Esa pagina no existe</h1>
<Grid>
<RowCol><h1>Esa pagina no existe</h1></RowCol>
<RowCol>
<button className='link' onClick={() => props.history.goBack()}>Volver</button>
</div>
</RowCol>
</Grid>
);
}