-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Añadido del Home de la aplicación
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"react-router-dom": "^6.22.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
import Grid from '@mui/material/Grid'; | ||
import Paper from '@mui/material/Paper'; | ||
import Typography from '@mui/material/Typography'; | ||
|
||
function Game({ title }) { | ||
return ( | ||
<Grid item xs={4}> | ||
<Paper sx={{ p: 2, bgcolor: 'red' }}> | ||
<Typography variant="h6">{title}</Typography> | ||
</Paper> | ||
</Grid> | ||
); | ||
} | ||
|
||
function GamesPanel() { | ||
return ( | ||
<Grid container spacing={2}> | ||
<Game title="Saber y ganar" /> | ||
<Game title="Elemento 2" /> | ||
<Game title="Elemento 3" /> | ||
</Grid> | ||
); | ||
} | ||
|
||
export default GamesPanel; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React, {useState} from 'react'; | ||
import NavBar from "./NavBar"; | ||
import GamesPanel from "./GamesPanel"; | ||
import Container from "@mui/material/Container"; | ||
|
||
const Home = (props) => { | ||
// userData contiene los datos del usuario que fueron pasados como props desde el componente Login | ||
|
||
return ( | ||
<Container component="main" maxWidth={false} style={{ height: '100vh' }}> | ||
<NavBar/> | ||
<GamesPanel/> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Home; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import AppBar from '@mui/material/AppBar'; | ||
import Toolbar from '@mui/material/Toolbar'; | ||
import Button from '@mui/material/Button'; | ||
import Typography from '@mui/material/Typography'; | ||
|
||
function NavBar() { | ||
return ( | ||
<AppBar position="static"> | ||
<Toolbar> | ||
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}> | ||
Saber y Ganar | ||
</Typography> | ||
<Button color="inherit">Mi Perfil</Button> | ||
<Button color="inherit">Buscador</Button> | ||
</Toolbar> | ||
</AppBar> | ||
); | ||
} | ||
|
||
export default NavBar; |