forked from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementación CSS de HistoricalData y otros cambios
- Loading branch information
Showing
4 changed files
with
105 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.contenedor { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
div[title="botones"]{ | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
align-items: center; | ||
margin-top: 2em; | ||
margin-bottom: 2em; | ||
grid-gap: 2em; | ||
} | ||
|
||
button{ | ||
margin: 1em; | ||
padding: 0.25em; | ||
background-color: rgba(31, 60, 134, 0.764); | ||
color: white; | ||
font-size: 0.75em; | ||
} | ||
|
||
table { | ||
width: 90%; | ||
border-collapse: collapse; | ||
color: black; | ||
} | ||
|
||
th, td { | ||
padding: 0.25em; | ||
text-align: center; | ||
border: 0.1em solid #000; | ||
} | ||
|
||
th[title='pregunta'] { | ||
background-color: rgba(41, 120, 152, 0.764); | ||
} | ||
|
||
th[title='correcta'] { | ||
background-color: rgba(79, 141, 18, 0.726); | ||
} | ||
|
||
th[title='incorrecta'] { | ||
background-color: rgba(230, 72, 72, 0.952); | ||
} | ||
|
||
td{ | ||
background-color: rgba(61, 178, 224, 0.764); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import axios from 'axios'; | ||
import React, { useState} from 'react'; | ||
import { useNavigate} from 'react-router-dom'; | ||
import { Container, Button} from '@mui/material'; | ||
|
||
const HistoricalQuestions = () => { | ||
const navigate = useNavigate(); | ||
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; | ||
|
||
const [questionsHistory, setQuestionsHistory] = useState([]); | ||
|
||
const handleShowHistory = async () => { | ||
try{ | ||
// It makes a petition to the api and store the response | ||
const response = await axios.post(`${apiEndpoint}/getquestionshistory`, { }); | ||
setQuestionsHistory(response.data); | ||
}catch (error){ | ||
console.error('Error:', error); | ||
} | ||
} | ||
|
||
const handlePreviousPage = async () => { | ||
let path= '/MainPage'; | ||
navigate(path); | ||
} | ||
|
||
return ( | ||
|
||
<Container component="main" maxWidth="xs" sx={{ marginTop: 4 }}> | ||
|
||
<div> | ||
|
||
</div> | ||
</Container> | ||
|
||
); | ||
}; | ||
|
||
export default HistoricalQuestions; |
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