From 0ef331586314ab6a6489ee22f234b994697c25ae Mon Sep 17 00:00:00 2001 From: Maxim Velesyuk Date: Sun, 15 Dec 2024 15:04:51 +0100 Subject: [PATCH] Fix style colors --- src/pages/map/components/action/NumRating.tsx | 4 ++-- src/pages/map/components/action/TurnModal.tsx | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/map/components/action/NumRating.tsx b/src/pages/map/components/action/NumRating.tsx index 6e8aac57..61511eab 100644 --- a/src/pages/map/components/action/NumRating.tsx +++ b/src/pages/map/components/action/NumRating.tsx @@ -54,9 +54,9 @@ function getIconContainerWithColor(value?: number | null) { } const color = - value <= 4 + value < 4 ? Color.red - : value <= 7 + : value < 7 ? Color.orange : value > 9 ? Color.purple diff --git a/src/pages/map/components/action/TurnModal.tsx b/src/pages/map/components/action/TurnModal.tsx index 7540441d..a8383500 100644 --- a/src/pages/map/components/action/TurnModal.tsx +++ b/src/pages/map/components/action/TurnModal.tsx @@ -116,7 +116,7 @@ export default function TurnModal({ open, onClose, onConfirm, player }: Props) { }) } - let formattedGameName = gameName?.replace(/\s\(\d{4}\)$/, "").trim() + let formattedGameName = gameName?.replace(/\s\(\d{4}\)$/, '').trim() const hltbLink = `https://howlongtobeat.com/?q=${formattedGameName}` useEffect(() => { @@ -421,7 +421,7 @@ export default function TurnModal({ open, onClose, onConfirm, player }: Props) { variant={ gameHours === 'tiny' ? 'contained' : 'outlined' } - color={gameHours === 'tiny' ? 'secondary' : 'info'} + color={gameHours === 'tiny' ? 'primary' : 'info'} style={{ width: '230px', height: '44px', @@ -442,7 +442,7 @@ export default function TurnModal({ open, onClose, onConfirm, player }: Props) {