From 01465e844bb74aab162915c2530d956aa146b5c9 Mon Sep 17 00:00:00 2001 From: Marces Zastrow Date: Wed, 8 Jan 2025 14:08:00 +0100 Subject: [PATCH] + Game page updated --- backend/database.db | Bin 40960 -> 40960 bytes frontend/src/pages/games.jsx | 6 +++-- frontend/src/pages/profile.jsx | 48 +++++++++++++++++---------------- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/backend/database.db b/backend/database.db index 743abed89d148995d4a2d058b99472a7db375f3e..0d76e02bb4a32769d07f7446ad14fd76106b0291 100644 GIT binary patch delta 169 zcmZoTz|?SnX@WGP;Y1l{M#GH>3;TKbS1>U1J23Fy<8S46*eobu#4qT~EWp4iD=Ew* zDayde#K@#OdFFf-7e|H4{L;L11=pN31^3LN97QIeDt@3U1_lO3AmC>(3P~+4Q7{53 mV1AVX1V%s^Gh~DKK?W%sDKJ8GGQxElf^`}Kb%OMz7y%AfV diff --git a/frontend/src/pages/games.jsx b/frontend/src/pages/games.jsx index c24dc77..591896d 100644 --- a/frontend/src/pages/games.jsx +++ b/frontend/src/pages/games.jsx @@ -65,7 +65,7 @@ const GamesPage = () => { {/* CharName, Health and Mana Bars */} {character.CharName} - + Health @@ -89,7 +89,9 @@ const GamesPage = () => { {/* Character Info Section */} Description - {character.description} + + {character.description} + {/* Inventory */} diff --git a/frontend/src/pages/profile.jsx b/frontend/src/pages/profile.jsx index 80691dd..489acbf 100644 --- a/frontend/src/pages/profile.jsx +++ b/frontend/src/pages/profile.jsx @@ -1,10 +1,11 @@ import React, { useState, useEffect, useContext } from 'react'; +import { Link } from 'react-router-dom'; import { UserContext } from '../context/UserContext'; import axios from 'axios'; import { Box, Typography, Grid2, Card, CardContent, CardMedia } from '@mui/material'; import defaultCharacterImage from '../assets/default-character.png'; -function Profile() { +const Profile = () => { const { userId, username } = useContext(UserContext); const [characters, setCharacters] = useState([]); @@ -26,7 +27,6 @@ function Profile() { return ( - {/* Username on top */} Benutzerprofil: {username} @@ -37,31 +37,33 @@ function Profile() { {characters.map((character) => ( - - - - - - {character.CharName} - - - Race: {character.Race} - - - Age: {character.Age} - - - + + + + + + + {character.CharName} + + + Race: {character.Race} + + + Age: {character.Age} + + + + ))} ); -} +}; export default Profile; \ No newline at end of file