From af90b58f6571cdb2572ac20db6ad610cdfab768c Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Wed, 20 Nov 2024 17:32:48 +0100 Subject: [PATCH] finished most things --- src/components/ActionRegistry.tsx | 4 ++-- src/components/AdminPage.tsx | 2 -- src/components/Rooms.tsx | 32 +++++++++++++++++-------------- src/pages/[room]/index.astro | 2 +- src/styles.css | 13 +++++++++---- 5 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/components/ActionRegistry.tsx b/src/components/ActionRegistry.tsx index 73c0d74..4c7bfcd 100644 --- a/src/components/ActionRegistry.tsx +++ b/src/components/ActionRegistry.tsx @@ -138,7 +138,7 @@ export const ActionRegistry = ({ room, refreshRoom }: Props) => { } return ( - <> +
{room.actions.map((action, index) => action.type === 'answer' ? ( {
) )} - + ) } diff --git a/src/components/AdminPage.tsx b/src/components/AdminPage.tsx index aa17001..abdad63 100644 --- a/src/components/AdminPage.tsx +++ b/src/components/AdminPage.tsx @@ -44,14 +44,12 @@ export const AdminPage = ({ roomId }: { roomId: string }) => { Object.values(listeners.current).forEach(listener => listener(teamQuestion)) } /> -  

Azioni

(listeners.current[key] = listener)} /> -  

Registro Azioni

diff --git a/src/components/Rooms.tsx b/src/components/Rooms.tsx index 775e7a6..798065d 100644 --- a/src/components/Rooms.tsx +++ b/src/components/Rooms.tsx @@ -12,19 +12,23 @@ export const Rooms = () => { return
Loading...
} - return rooms.map((room, i) => ( -
-
- {room.id} -
- -
+ return ( +
+ {rooms.map((room, i) => ( +
+
+ {room.id} +
+ +
+
+ ))}
- )) + ) } diff --git a/src/pages/[room]/index.astro b/src/pages/[room]/index.astro index 7058d31..916ad20 100644 --- a/src/pages/[room]/index.astro +++ b/src/pages/[room]/index.astro @@ -9,6 +9,6 @@ if (!room) { --- -

{room}

+ diff --git a/src/styles.css b/src/styles.css index 97ec932..9672c56 100644 --- a/src/styles.css +++ b/src/styles.css @@ -41,8 +41,8 @@ body { justify-items: center; align-content: start; - padding: 6rem 1rem 12rem; - gap: 1rem; + padding: 3rem 1rem 12rem; + gap: 3rem; } /* Typography */ @@ -347,7 +347,8 @@ button { } */ - padding: 0.5rem 0.25rem; + /* padding: 0.5rem 0.25rem; */ + padding: 0 0.25rem; text-align: center; font-size: 22px; @@ -415,7 +416,8 @@ button { border-top-left-radius: 8px; border-bottom-left-radius: 8px; - padding: 0.25rem 0.5rem; + /* padding: 0.25rem 0.5rem; */ + padding: 0rem 0.5rem; gap: 1rem; color: #fff; @@ -431,6 +433,9 @@ button { > .score { grid-area: 1 / 2; font-size: 16px; + + display: grid; + place-content: center; } }