Skip to content

Commit 867c126

Browse files
fix(profile): only fade PB base content when PB exists
1 parent 33eaada commit 867c126

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

frontend/src/ts/components/pages/profile/UserProfile.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,13 @@ function PbTable<M extends "time" | "words">(props: {
127127
<For each={bests()}>
128128
{(item) => (
129129
<div class="group grid items-center">
130-
<div class="col-start-1 row-start-1 text-center transition-opacity group-hover:opacity-0">
130+
<div
131+
class={
132+
item.pb !== undefined
133+
? "col-start-1 row-start-1 text-center transition-opacity group-hover:opacity-0"
134+
: "col-start-1 row-start-1 text-center"
135+
}
136+
>
131137
<div class="text-xs text-sub">
132138
{item.mode2} {props.mode === "time" ? "seconds" : "words"}
133139
</div>
@@ -142,6 +148,7 @@ function PbTable<M extends "time" | "words">(props: {
142148
})}
143149
</div>
144150
</div>
151+
145152
<Show when={item.pb !== undefined}>
146153
<div class="col-start-1 row-start-1 grid bg-sub-alt text-center text-xs opacity-0 transition-opacity group-hover:opacity-100">
147154
<div class="text-sub">

0 commit comments

Comments
 (0)