Skip to content

Commit

Permalink
fix errorneous polyfill label for playing/stopping hit in firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
Timtam committed Nov 6, 2024
1 parent 4773a4a commit 520d598
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 1 addition & 7 deletions client/src/pages/game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -596,13 +596,7 @@ export function Game() {
detect()?.name === "firefox"
? canSkip()
? `${t("skipHitShortcut")} ${t("skipHit")}`
: game.players.find((p) => p.id === user?.id)
?.state === PlayerState.Guessing
? t("skipHitNotGuessing")
: game.players.find((p) => p.id === user?.id)
?.tokens === 0
? t("skipHitNoToken")
: t("cannotSkipHit")
: ""
: ""
}
onClick={skipHit}
Expand Down
6 changes: 4 additions & 2 deletions client/src/pages/game/hit-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ export const HitPlayer = forwardRef<HitPlayerRef, HitPlayerProps>(
disabled={src === ""}
aria-keyshortcuts={shortcut !== undefined ? shortcut : ""}
aria-label={
detect()?.name === "firefox" && shortcut !== undefined
? shortcut
detect()?.name === "firefox" &&
shortcut !== undefined &&
src !== ""
? `${shortcut} ${playing ? t("stopHit") : t("playHit")}`
: ""
}
onClick={() => {
Expand Down

0 comments on commit 520d598

Please sign in to comment.