forked from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from Arquisoft/UO287747-Develop
Uo287747 develop
- Loading branch information
Showing
11 changed files
with
222 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,54 @@ | ||
import { Typography } from "@mui/material" | ||
import { Card, Typography } from "@mui/material" | ||
import Table from '@mui/material/Table'; | ||
import TableBody from '@mui/material/TableBody'; | ||
import TableCell from '@mui/material/TableCell'; | ||
import TableContainer from '@mui/material/TableContainer'; | ||
import TableRow from '@mui/material/TableRow'; | ||
import Paper from '@mui/material/Paper'; | ||
|
||
export const PostGame = () => { | ||
|
||
const formatTiempo = (segundos) => { | ||
const minutos = Math.floor((segundos % 3600) / 60); | ||
const segs = segundos % 60; | ||
return `${minutos < 10 ? '0' : ''}${minutos}:${segs < 10 ? '0' : ''}${segs}`; | ||
}; | ||
|
||
return ( | ||
|
||
<> | ||
<Typography>FIN</Typography> | ||
</> | ||
<main className='preguntas'> | ||
<div> | ||
<Typography sx={{ textAlign: 'center', fontSize:'2.2em' }}>Fin del juego</Typography> | ||
<Card> | ||
<TableContainer component={Paper}> | ||
<Table sx={{ minWidth: 650 }} aria-label="simple table"> | ||
<TableBody> | ||
|
||
<TableRow key={"Preguntas acertadas"} sx={{ '&:last-child td, &:last-child th': { border: 0 } }}> | ||
<TableCell sx={{ fontSize:'1.3em' }}>Preguntas acertadas</TableCell> | ||
<TableCell sx={{ fontSize:'1.3em' }} align="right">{localStorage.getItem("pAcertadas")}</TableCell> | ||
</TableRow> | ||
|
||
<TableRow key={"Preguntas falladas"} sx={{ '&:last-child td, &:last-child th': { border: 0 } }}> | ||
<TableCell sx={{ fontSize:'1.3em' }}>Preguntas falladas</TableCell> | ||
<TableCell sx={{ fontSize:'1.3em' }} align="right">{localStorage.getItem("pFalladas")}</TableCell> | ||
</TableRow> | ||
|
||
<TableRow key={"Tiempo usado"} sx={{ '&:last-child td, &:last-child th': { border: 0 } }}> | ||
<TableCell sx={{ fontSize:'1.3em' }}>Tiempo usado</TableCell> | ||
<TableCell sx={{ fontSize:'1.3em' }} align="right">{formatTiempo(localStorage.getItem("tiempoUsado"))}</TableCell> | ||
</TableRow> | ||
|
||
<TableRow key={"Tiempo restante"} sx={{ '&:last-child td, &:last-child th': { border: 0 } }}> | ||
<TableCell sx={{ fontSize:'1.3em' }}>Tiempo restante</TableCell> | ||
<TableCell sx={{ fontSize:'1.3em' }} align="right">{formatTiempo(localStorage.getItem("tiempoRestante"))}</TableCell> | ||
</TableRow> | ||
|
||
</TableBody> | ||
</Table> | ||
</TableContainer> | ||
</Card> | ||
</div> | ||
</main> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.