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",
"private": true,
"version": "0.6.8",
"version": "0.6.9",
"type": "commonjs",
"engines": {
"node": ">=18",

View File

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

View File

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