From 003f9eb41c0e8dc46e057be50070c37e574b9f21 Mon Sep 17 00:00:00 2001 From: Dominic Zimmer Date: Fri, 28 Oct 2022 18:27:50 +0200 Subject: [PATCH] Update shit --- frontend/src/Client.css | 6 +++++- frontend/src/Client.tsx | 2 +- frontend/src/TVMode.tsx | 18 ++++++------------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/frontend/src/Client.css b/frontend/src/Client.css index d99f46f..8d5c03f 100644 --- a/frontend/src/Client.css +++ b/frontend/src/Client.css @@ -151,4 +151,8 @@ grid-column: 7; grid-row: 7; } -*/ \ No newline at end of file +*/ + +.client { + background-color: black; +} \ No newline at end of file diff --git a/frontend/src/Client.tsx b/frontend/src/Client.tsx index c68d052..7b14f49 100644 --- a/frontend/src/Client.tsx +++ b/frontend/src/Client.tsx @@ -50,7 +50,7 @@ const Client = () => { }, []) return ( -
+
State:
{JSON.stringify(state)}
ButtonMap:
{mapToBitvector(buttonMap).map(s => s.toString()).join(" ")}
diff --git a/frontend/src/TVMode.tsx b/frontend/src/TVMode.tsx index dfc4f4e..e1d8097 100644 --- a/frontend/src/TVMode.tsx +++ b/frontend/src/TVMode.tsx @@ -39,18 +39,12 @@ const TVMode = () => { {Math.round(state.timeUntilNextMode ?? 0)}s ⏱️
- {voteList.flatMap(([b, numVotes], index) => numVotes === 0 - ? [ -
- {b} -
- ] - : [ -
- {b} {Math.round(numVotes / totalCount * 100) + "%"} -
- ] - )} + {voteList.flatMap(([b, numVotes], index) => { + const percentage = numVotes === 0 ? "" : Math.round(numVotes / totalCount * 100) + "%"; + return
+ {b}{percentage} +
; + })}
Current state: