From 5cfa086b1d31e91c2970cdeb3f054bba5516fea6 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Tue, 31 Dec 2024 09:23:09 -0500 Subject: [PATCH] Fix formatting issues --- components/XpProgressBar.tsx | 25 +++++++++++++++++++------ pages/profile.tsx | 7 ++++++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/components/XpProgressBar.tsx b/components/XpProgressBar.tsx index adb5f15..b07dda3 100644 --- a/components/XpProgressBar.tsx +++ b/components/XpProgressBar.tsx @@ -2,18 +2,31 @@ import { User } from "@/lib/Types"; import { xpRequiredForNextLevel } from "@/lib/Xp"; import { useState } from "react"; -export default function XpProgressBar({ user, size }: { user: User, size: string }) { - const [hovered, setHovered] = useState(false); +export default function XpProgressBar({ + user, + size, +}: { + user: User; + size: string; +}) { + const [hovered, setHovered] = useState(false); return (
setHovered(true)} - onMouseLeave={() => setHovered(false)} + onMouseEnter={() => setHovered(true)} + onMouseLeave={() => setHovered(false)} > - {hovered ? `${user.xp}/${xpRequiredForNextLevel(user.level)}` : `Lvl ${user.level}`} + {hovered + ? `${user.xp}/${xpRequiredForNextLevel(user.level)}` + : `Lvl ${user.level}`}
); } diff --git a/pages/profile.tsx b/pages/profile.tsx index f1d2074..9cae10d 100644 --- a/pages/profile.tsx +++ b/pages/profile.tsx @@ -121,7 +121,12 @@ export default function Profile(props: { teamList: Team[] }) { <> )} - { user != null && } + {user != null && ( + + )}