Skip to content

Commit

Permalink
Point system view updated
Browse files Browse the repository at this point in the history
  • Loading branch information
UO276255 committed Mar 15, 2024
1 parent 2acba2f commit 9148dce
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions webapp/src/views/Game.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useParams, useNavigate } from "react-router-dom";
import ProtectedComponent from "./components/ProtectedComponent";
import axios from "axios";
import { AuthContext } from "../App";
import coinImage from '../media/coin.svg';

const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000';

Expand Down Expand Up @@ -159,13 +160,18 @@ export default function Game() {
<Fragment>
<ProtectedComponent />
<Container component="main" maxWidth="md" sx={{ marginTop: 4, display: "flex", flexDirection: { xs: "row", md: "column" } }}>

<Paper elevation={3} sx={{ margin: "2rem 0", padding: "1rem" }}>
<Box sx={{ ml: 1, display: "flex", alignItems: "center", marginLeft: "1000px" }}>
<Typography sx={{ fontWeight: 400, fontSize: "35px" }}>
{pointsUpdated}
</Typography>
<img src={coinImage} alt="Coin" style={{ marginLeft: "10px", height: "70px", width: "70px" }} />
</Box>
<Paper elevation={3} sx={{margin: "2rem 0", padding: "1rem"}}>
<Typography variant="h4">
{questions[current].statement}
</Typography>

<Divider sx={{ margin: "10px 0" }} />
<Divider sx={{margin: "10px 0"}}/>

{questions[current].options.map((option, i) => (
<Typography key={i} component="p" variant="h6">
Expand All @@ -175,18 +181,13 @@ export default function Game() {

</Paper>

<Paper sx={{ padding: "1rem", marginBottom: "1rem" }}>
<Paper sx={{padding: "1rem", marginBottom: "1rem"}}>

<Box sx={{ ml: 1, display: "flex", margin: "5px" }}>
<Box sx={{ml: 1, display: "flex", margin: "5px" }}>
<Typography sx={{ fontWeight: 400, fontSize: "15px" }}>
Time left: {timeLeft}
</Typography>
</Box>
<Box sx={{ ml: 1, display: "flex", margin: "5px" }}>
<Typography sx={{ fontWeight: 400, fontSize: "15px" }}>
Points: {pointsUpdated}
</Typography>
</Box>

<Box sx={{ margin: "10px" }}>
<MiLinea />
Expand Down

0 comments on commit 9148dce

Please sign in to comment.