fix(account page): tidy up highest wpm description (@cosmatevs) (#6329)

### Description
Account page:
* remove unnecessary &
![& in highest wpm
description](https://github.com/user-attachments/assets/61e01116-2db8-4a80-93f0-c204c6e3349a)
* build punctuation and number strings only if they're going to be used

### Checks
- [x] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.
This commit is contained in:
Nopke 2025-03-03 11:18:07 +01:00 committed by GitHub
parent 823e9e0685
commit b375636c99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -645,13 +645,12 @@ async function fillContent(): Promise<void> {
});
if (result.wpm > topWpm) {
const puncsctring = result.punctuation ? ",<br>with punctuation" : "";
const numbsctring = result.numbers
? ",<br> " + (result.punctuation ? "&" : "") + "with numbers"
: "";
topWpm = result.wpm;
if (result.mode === "custom") topMode = result.mode;
else {
if (result.mode === "custom") {
topMode = result.mode;
} else {
const puncsctring = result.punctuation ? ",<br>with punctuation" : "";
const numbsctring = result.numbers ? ",<br>with numbers" : "";
topMode = result.mode + " " + result.mode2 + puncsctring + numbsctring;
}
}