finished most things

main
parent 8d236e9ed7
commit af90b58f65

@ -138,7 +138,7 @@ export const ActionRegistry = ({ room, refreshRoom }: Props) => {
} }
return ( return (
<> <div class="stack-v">
{room.actions.map((action, index) => {room.actions.map((action, index) =>
action.type === 'answer' ? ( action.type === 'answer' ? (
<ActionCardAnswer <ActionCardAnswer
@ -166,6 +166,6 @@ export const ActionRegistry = ({ room, refreshRoom }: Props) => {
</div> </div>
) )
)} )}
</> </div>
) )
} }

@ -44,14 +44,12 @@ export const AdminPage = ({ roomId }: { roomId: string }) => {
Object.values(listeners.current).forEach(listener => listener(teamQuestion)) Object.values(listeners.current).forEach(listener => listener(teamQuestion))
} }
/> />
&nbsp;
<h2>Azioni</h2> <h2>Azioni</h2>
<SubmitAction <SubmitAction
room={room} room={room}
refreshRoom={fetchRoom} refreshRoom={fetchRoom}
onTeamQuestionIndex={(key, listener) => (listeners.current[key] = listener)} onTeamQuestionIndex={(key, listener) => (listeners.current[key] = listener)}
/> />
&nbsp;
<h2>Registro Azioni</h2> <h2>Registro Azioni</h2>
<ActionRegistry room={room} refreshRoom={fetchRoom} /> <ActionRegistry room={room} refreshRoom={fetchRoom} />
</> </>

@ -12,19 +12,23 @@ export const Rooms = () => {
return <div>Loading...</div> return <div>Loading...</div>
} }
return rooms.map((room, i) => ( return (
<div class="card tint-green stack-v center"> <div class="stack-v">
<div class="fill-w stack-h center" key={i}> {rooms.map((room, i) => (
<code>{room.id}</code> <div class="card tint-green stack-v center">
<div class="fill"></div> <div class="fill-w stack-h center" key={i}>
<button <code>{room.id}</code>
onClick={() => { <div class="fill"></div>
location.href = `/${room.id}` <button
}} onClick={() => {
> location.href = `/${room.id}`
Classifica }}
</button> >
</div> Classifica
</button>
</div>
</div>
))}
</div> </div>
)) )
} }

@ -9,6 +9,6 @@ if (!room) {
--- ---
<Base> <Base>
<h1>{room}</h1> <!-- <h1>{room}</h1> -->
<LiveLeaderboard client:load roomId={room} /> <LiveLeaderboard client:load roomId={room} />
</Base> </Base>

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

Loading…
Cancel
Save