From cadac710db413c10896fba03537c2e1114a7eb63 Mon Sep 17 00:00:00 2001 From: Cozma Rares Date: Thu, 17 Aug 2023 13:33:46 +0300 Subject: [PATCH] refactor: background color --- client/src/components/History.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/client/src/components/History.tsx b/client/src/components/History.tsx index d509248..67649d3 100644 --- a/client/src/components/History.tsx +++ b/client/src/components/History.tsx @@ -29,18 +29,17 @@ const History: React.FC<{ moveHistory.forEach(({ san }, idx) => { const fullMove = (idx >> 1) + 1; - const bg = fullMove % 2 == 0 ? "bg-zinc-600" : ""; const current = idx == currentPosition ? "bg-gray-500/80" : ""; if (idx % 2 == 0) history.push( - + {fullMove}. ); history.push( - + {san} @@ -48,13 +47,7 @@ const History: React.FC<{ ); }); - if (history.length % 3) - history.push( - - ); + if (history.length % 3) history.push(); return (
History
{history}