diff --git a/ludos/frontend/src/assets/admin.png b/ludos/frontend/src/assets/admin.png new file mode 100644 index 00000000..63639ea6 Binary files /dev/null and b/ludos/frontend/src/assets/admin.png differ diff --git a/ludos/frontend/src/assets/certification.png b/ludos/frontend/src/assets/certification.png new file mode 100644 index 00000000..f5ae389f Binary files /dev/null and b/ludos/frontend/src/assets/certification.png differ diff --git a/ludos/frontend/src/pages/ProfilePage.js b/ludos/frontend/src/pages/ProfilePage.js index 5935ea3d..64be0d01 100644 --- a/ludos/frontend/src/pages/ProfilePage.js +++ b/ludos/frontend/src/pages/ProfilePage.js @@ -15,11 +15,12 @@ import steamLogo from "../assets/steam.png"; //import itchioLogo from "../assets/itchio.png"; import axios from "axios"; import { useNavigate, useParams } from "react-router-dom"; -import NotificationsIcon from "@mui/icons-material/Notifications"; import Gamer from "../assets/gamer.png"; import Developer from "../assets/developer.png"; import EsportPlayer from "../assets/esportplayer.png"; import GroupTopic from "../components/GroupTopic"; +import Admin from "../assets/admin.png"; +import AdminTick from "../assets/certification.png"; function ProfilePage() { const navigate = useNavigate(); @@ -42,6 +43,8 @@ function ProfilePage() { fullName: "", steamUrl: "", aboutMe: "", + associatedCompany: "", + associatedTeam: "", }); const [open, setOpen] = useState(false); const [auth, setAuth] = useState(false); @@ -135,6 +138,8 @@ function ProfilePage() { fullName: response.data.fullName, steamUrl: response.data.steamUrl, aboutMe: response.data.aboutMe, + associatedCompany: response.data.associatedCompany, + associatedTeam: response.data.associatedTeam, }); if (response.data.followedGames.length > 10) { setFavGames(response.data.followedGames.slice(0, 10)); @@ -173,6 +178,8 @@ function ProfilePage() { fullName: response1.data.fullName, steamUrl: response1.data.steamUrl, aboutMe: response1.data.aboutMe, + associatedCompany: response1.data.associatedCompany, + associatedTeam: response1.data.associatedTeam, }); if (response1.data.followedGames.length > 10) { setFavGames(response1.data.followedGames.slice(0, 10)); @@ -229,6 +236,8 @@ function ProfilePage() { fullName: formData.fullName, steamUrl: formData.steamUrl, aboutMe: formData.aboutMe, + associatedCompany: formData.associatedCompany, + associatedTeam: formData.associatedTeam, }, { headers: { @@ -327,7 +336,19 @@ function ProfilePage() { color: "rgb(0, 150, 255)", borderRadius: "15px", width: "auto", - height: "73%", + height: "75%", + marginTop: "10px", + justifyContent: "center", + alignItems: "center", + flexDirection: "column", + display: "flex", + padding: "10px", // Add padding to give some space between the content and the border + }; + const assoBoxStyle = { + color: "rgb(0, 150, 255)", + borderRadius: "15px", + width: "auto", + height: "90px", marginTop: "10px", justifyContent: "center", alignItems: "center", @@ -375,8 +396,10 @@ function ProfilePage() { return Gamer; case "developer": return Developer; - case "esport player": + case "e-sports_player": return EsportPlayer; + case "admin": + return Admin; default: return null; // Or a default image if userType doesn't match any specific type } @@ -439,17 +462,17 @@ function ProfilePage() { fontFamily: "Trebuchet MS, sans-serif", color: "rgb(0, 150, 255)", marginTop: "2%", - marginLeft: "30%", }} > @{profile.username} - + )} @@ -668,6 +691,62 @@ function ProfilePage() { multiline maxRows={4} /> + {profile.userType === "developer" && ( + <> + + Associated Company: + + + + )} + {profile.userType === "e-sports_player" && ( + <> + + Associated Team: + + + + )} + )} @@ -1017,6 +1126,35 @@ function ProfilePage() { > {userType} + {(profile.associatedTeam || profile.associatedCompany) && ( + + + + {profile.associatedTeam && "Team"} + {!profile.associatedTeam && + profile.associatedCompany && + "Company"} + + + + {profile.associatedTeam || profile.associatedCompany} + + + + )}