refactor: replace underscores

This commit is contained in:
Miodec 2023-10-02 16:25:51 +01:00
parent fa01558876
commit 73aca5b570

View file

@ -25,9 +25,10 @@ export function updateTime(sec: number, layout: string): void {
}
export function updateWords(words: number, layout: string): void {
let str = `${capitalizeFirstLetter(layout)} in: ${words} words`;
const layoutName = capitalizeFirstLetter(layout.replace(/_/g, " "));
let str = `${layoutName} in: ${words} words`;
if (words === 1) {
str = `${capitalizeFirstLetter(layout)} starting next word`;
str = `${layoutName} starting next word`;
}
$("#typingTest #layoutfluidTimer").text(str);
}