From 49608d94a7782cfbe4c70dc560020940bddaaa80 Mon Sep 17 00:00:00 2001 From: bal7hazar Date: Tue, 19 Nov 2024 14:41:39 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9B=20Minor=20design=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile/src/components/achievements/leaderboard.tsx | 7 ++----- packages/profile/src/components/achievements/trophy.tsx | 9 +-------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/profile/src/components/achievements/leaderboard.tsx b/packages/profile/src/components/achievements/leaderboard.tsx index 874437e9b..4006e538c 100644 --- a/packages/profile/src/components/achievements/leaderboard.tsx +++ b/packages/profile/src/components/achievements/leaderboard.tsx @@ -88,12 +88,11 @@ function Row({ self && "bg-quaternary text-primary", )} > -
+

{`${rank}.`}

@@ -107,18 +106,16 @@ function Row({ function User({ username, - self, Icon, }: { username: string; - self: boolean; Icon: React.ComponentType; }) { return (

- {self ? `${username} (you)` : username} + {username}

); diff --git a/packages/profile/src/components/achievements/trophy.tsx b/packages/profile/src/components/achievements/trophy.tsx index acc7a2aef..c5461b4e6 100644 --- a/packages/profile/src/components/achievements/trophy.tsx +++ b/packages/profile/src/components/achievements/trophy.tsx @@ -268,13 +268,6 @@ function Progress({ {`${count.toLocaleString()}`}

- ) : total > 1 ? ( -
-
-

- {`${count.toLocaleString()} of ${total.toLocaleString()}`} -

-
) : count >= total ? (
@@ -282,7 +275,7 @@ function Progress({
) : (

- {`${count.toLocaleString()} / ${total.toLocaleString()}`} + {`${count.toLocaleString()} of ${total.toLocaleString()}`}

)}
From 9c04ba2852db60991182ceba7a977f334479b39f Mon Sep 17 00:00:00 2001 From: bal7hazar Date: Tue, 19 Nov 2024 14:59:08 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20Minor=20design=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile/src/components/achievements/trophy.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/profile/src/components/achievements/trophy.tsx b/packages/profile/src/components/achievements/trophy.tsx index c5461b4e6..b9b1e56f1 100644 --- a/packages/profile/src/components/achievements/trophy.tsx +++ b/packages/profile/src/components/achievements/trophy.tsx @@ -261,18 +261,13 @@ function Progress({ )} />
- {count >= total && total > 1 ? ( -
+ {count >= total ? ( +

- {`${count.toLocaleString()}`} + {total > 1 ? `${count.toLocaleString()}` : "Completed"}

- ) : count >= total ? ( -
-
-

Completed

-
) : (

{`${count.toLocaleString()} of ${total.toLocaleString()}`} From 091ddab2cb08b5cf64e392f1c6b24d6bfa0b68d1 Mon Sep 17 00:00:00 2001 From: bal7hazar Date: Tue, 19 Nov 2024 15:00:26 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=92=84=20Code=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/profile/src/components/achievements/leaderboard.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/profile/src/components/achievements/leaderboard.tsx b/packages/profile/src/components/achievements/leaderboard.tsx index 4006e538c..3a9ed3aab 100644 --- a/packages/profile/src/components/achievements/leaderboard.tsx +++ b/packages/profile/src/components/achievements/leaderboard.tsx @@ -114,9 +114,7 @@ function User({ return (

-

- {username} -

+

{username}

); } From 272159ee0e5ccd53a2a1464228ab798205841416 Mon Sep 17 00:00:00 2001 From: bal7hazar Date: Tue, 19 Nov 2024 19:21:51 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=90=9B=20Fix=20some=20padding=20misma?= =?UTF-8?q?tches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/achievements/index.tsx | 2 +- .../src/components/achievements/tab.tsx | 13 +++-- .../src/components/achievements/trophies.tsx | 48 ++++++++++--------- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/packages/profile/src/components/achievements/index.tsx b/packages/profile/src/components/achievements/index.tsx index d742a8e46..0f6563a1c 100644 --- a/packages/profile/src/components/achievements/index.tsx +++ b/packages/profile/src/components/achievements/index.tsx @@ -90,7 +90,7 @@ export function Achievements() { {achievements.length ? ( {isSelf && ( -
+
void; }) { return ( - + -

+

{`${completed}/${total}`}

@@ -40,7 +40,7 @@ export function LeaderboardTab({ onClick: () => void; }) { return ( - + void; children: React.ReactNode; }) { @@ -88,7 +90,8 @@ export function Tab({ return (
+

{label}

diff --git a/packages/profile/src/components/achievements/trophies.tsx b/packages/profile/src/components/achievements/trophies.tsx index 949601266..cc4849cd6 100644 --- a/packages/profile/src/components/achievements/trophies.tsx +++ b/packages/profile/src/components/achievements/trophies.tsx @@ -49,7 +49,7 @@ export function Trophies({ ); return ( -
+

Total @@ -64,28 +64,30 @@ export function Trophies({ {`${completed} of ${total}`}

- {Object.entries(groups) - .filter(([group]) => group !== HIDDEN_GROUP) - .map(([group, items]) => ( - - ))} - a.earning - b.earning, - )} - softview={softview} - enabled={enabled} - onPin={onPin} - /> +
+ {Object.entries(groups) + .filter(([group]) => group !== HIDDEN_GROUP) + .map(([group, items]) => ( + + ))} + a.earning - b.earning, + )} + softview={softview} + enabled={enabled} + onPin={onPin} + /> +
); }