From 008bbd9569047c1e21d8dafbb75986253dbecf60 Mon Sep 17 00:00:00 2001 From: Calum Murphy Date: Fri, 2 Oct 2026 09:21:49 +0100 Subject: [PATCH 1/2] Updating animation on team and name select --- frontend/app/components/Name.jsx | 20 +++++++++++--------- frontend/app/globals.css | 10 +++++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/frontend/app/components/Name.jsx b/frontend/app/components/Name.jsx index 5b7fc20..7419554 100644 --- a/frontend/app/components/Name.jsx +++ b/frontend/app/components/Name.jsx @@ -47,7 +47,6 @@ export default function Name() { const teamId = e.currentTarget.value; const matches = people.filter((p) => p.teamId === teamId); - setSelectedTeamId(teamId); setPeopleInTeam(matches); @@ -74,7 +73,7 @@ export default function Name() { {/* Header */} {!selectedTeamId ? ( -
+

Select your team. @@ -84,14 +83,15 @@ export default function Name() {

- {teams.map((t) => { - const colour = colours[Math.floor(Math.random() * colours.length)]; + {teams.map((t, index) => { + const colour = colours[index > colours.length - 1 ? index - colours.length : index]; return (
) : ( -
+

Select your name. @@ -120,16 +120,18 @@ export default function Name() {

- {peopleInTeam.map((p) => { - const colour = colours[Math.floor(Math.random() * colours.length)]; + {peopleInTeam.map((p, index) => { + const colour = colours[index > colours.length - 1 ? index - colours.length : index]; return (