Skip to content

Commit

Permalink
Merge pull request #686 from bounswe/frontend/feature/592/reputation-…
Browse files Browse the repository at this point in the history
…points

[Frontend] Show reputation points in profile page
  • Loading branch information
ozdentarikcan authored Dec 16, 2024
2 parents 9b4009d + 27fb4cc commit d94be23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/routes/profile.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe("Profile component", () => {
answerCount: 5,
followersCount: 50,
followingCount: 30,
reputationPoints: 75,
bio: "This is John's bio",
country: "US",
},
Expand All @@ -87,6 +88,7 @@ describe("Profile component", () => {
expect(screen.getByText("5")).toBeInTheDocument();
expect(screen.getByText("50")).toBeInTheDocument();
expect(screen.getByText("30")).toBeInTheDocument();
expect(screen.getByText("75")).toBeInTheDocument();
expect(screen.getAllByText("Questions").length).toBeGreaterThan(1);
expect(screen.getAllByText("Answers").length).toBeGreaterThan(1);
});
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/routes/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ export default function Profile() {
<div className="font-bold">{profile.followingCount}</div>
<div className="text-sm text-gray-700">Following</div>
</div>
<div>
<div className="font-bold">{profile.reputationPoints}</div>
<div className="text-sm text-gray-700">Reputation Points</div>
</div>
</div>
</div>
<div className="flex items-center justify-between">
Expand Down

0 comments on commit d94be23

Please sign in to comment.