Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Nancy Wei committed Jul 14, 2024
2 parents 00ed15c + 915c792 commit 1c0c491
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
Binary file added web/src/assets/one.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/src/assets/three.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/src/assets/two.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 48 additions & 1 deletion web/src/pages/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import "../styles/Profile.css";
import PointIcon from "@mui/icons-material/Timeline";
import AttendIcon from "@mui/icons-material/FmdGood";
import CreateIcon from "@mui/icons-material/Create";
import One from "../assets/one.png";
import Two from "../assets/two.png";
import Three from "../assets/three.png";

interface User {
name: string;
Expand Down Expand Up @@ -250,7 +253,51 @@ export default function Profile() {
<h2 className="text-2xl font-bold text-navy mb-4">
ACHIEVEMENTS
</h2>
<div className="pb-96">
<div className="pb-96 grid grid-cols-2">
{data.points >= 50 ? (
<div className="col-span-1 mx-auto items-center text-center">
<img
src={Three}
className="w-32 mx-auto"
alt=""
/>
<p className="text-navy text-center font-semibold">
50 Points
</p>
</div>
) : (
<div></div>
)}

{data.points >= 100 ? (
<div className="col-span-1 mx-auto">
<img
src={One}
className="w-32 mx-auto"
alt=""
/>
<p className="text-navy text-center font-semibold">
100 Points
</p>
</div>
) : (
<div></div>
)}
{data.points >= 200 ? (
<div className="col-span-1 mx-auto">
<img
src={Two}
className="w-32 mx-auto"
alt=""
/>
<p className="text-navy text-center font-semibold">
200 Points
</p>
</div>
) : (
<div></div>
)}

{/* Add content for achievements */}
</div>
</div>
Expand Down

0 comments on commit 1c0c491

Please sign in to comment.