fix random interval wrapper showing if enabled but show player is disabled

This commit is contained in:
Viktor Rådberg
2024-03-17 18:41:58 +01:00
parent 334b46db6e
commit d6cd678e9f
3 changed files with 6 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
{ {
"name": "life-trinket", "name": "life-trinket",
"private": true, "private": true,
"version": "0.6.8", "version": "0.6.9",
"type": "commonjs", "type": "commonjs",
"engines": { "engines": {
"node": ">=18", "node": ">=18",

View File

@@ -243,7 +243,8 @@ const LifeCounter = ({ player, opponents }: LifeCounterProps) => {
{player.hasLost && ( {player.hasLost && (
<PlayerLostWrapper $rotation={player.settings.rotation} /> <PlayerLostWrapper $rotation={player.settings.rotation} />
)} )}
{settings.useRandomStartingPlayerInterval && {settings.showStartingPlayer &&
settings.useRandomStartingPlayerInterval &&
!stopPlayerRandomization && !stopPlayerRandomization &&
!playing && ( !playing && (
<div <div

View File

@@ -42,6 +42,7 @@ export const Players = (players: PlayerType[], gridClasses: string) => {
useEffect(() => { useEffect(() => {
if ( if (
settings.showStartingPlayer &&
settings.useRandomStartingPlayerInterval && settings.useRandomStartingPlayerInterval &&
!stopPlayerRandomization && !stopPlayerRandomization &&
!playing !playing
@@ -102,7 +103,8 @@ export const Players = (players: PlayerType[], gridClasses: string) => {
return ( return (
<PlayersWrapper> <PlayersWrapper>
{settings.useRandomStartingPlayerInterval && {settings.showStartingPlayer &&
settings.useRandomStartingPlayerInterval &&
!stopPlayerRandomization && !stopPlayerRandomization &&
!playing && ( !playing && (
<div <div