From 20117166544373e78d35c3fec6a3e1376b70af05 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 23 Apr 2026 14:23:44 -0500 Subject: [PATCH] Simplify home and profile pages --- PLAN.md | 4 + docs/architecture.md | 1 + frontend/src/pages/DashboardPage.tsx | 108 +++++++++++++-------------- frontend/src/pages/ProfilePage.tsx | 10 --- 4 files changed, 59 insertions(+), 64 deletions(-) diff --git a/PLAN.md b/PLAN.md index c60f83e..be548b9 100644 --- a/PLAN.md +++ b/PLAN.md @@ -14,6 +14,10 @@ - Installable React PWA shell with offline-ready game prep scaffolding. - Docker-based local development stack. +## Completed UI Cleanup +- Home page now acts as a lightweight landing page with direct links to Library and Gameday. +- Removed the old game-list-heavy dashboard content that was not useful as a landing surface. + ## Storage Status - Backend media persists in the `backend-media` named Docker volume. diff --git a/docs/architecture.md b/docs/architecture.md index 54b6a43..8271f08 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -15,6 +15,7 @@ Walkup is a baseball walk-up song app with a React PWA frontend and a FastAPI ba - The app uses React Router for navigation and TanStack Query for server state. - TeamSnap data is loaded through the official JavaScript SDK from the browser after the backend provides an access token. - The UI includes player, gameday, and library views for clip management and gameday playback. +- The home page is a lightweight landing page that orients users and links to the Library and Gameday views. - The app is shipped as a PWA with install and offline-prep behavior. ## Backend diff --git a/frontend/src/pages/DashboardPage.tsx b/frontend/src/pages/DashboardPage.tsx index c311f09..c7cdcb0 100644 --- a/frontend/src/pages/DashboardPage.tsx +++ b/frontend/src/pages/DashboardPage.tsx @@ -1,20 +1,45 @@ -import { useNavigate } from "react-router-dom"; +import { Link } from "react-router-dom"; import { useWalkupContext } from "../hooks/useWalkupContext"; -import { formatGameDate, formatGameTitle, formatMemberName } from "../lib/teamsnapHelpers"; export function DashboardPage() { - const navigate = useNavigate(); const walkup = useWalkupContext(); if (!walkup.isTeamSnap) { return ( -
-
-
-

Player flow

-

Sign in with TeamSnap to resolve your player and team context.

-

The player dashboard depends on your TeamSnap user, roster membership, and upcoming games.

+
+
+
+
+
+

Library

+

Manage walkup clips

+

+ Upload audio, trim clips, reorder them, and pin them to players before game day. +

+
+ + Open Library + +
+
+
+
+
+
+
+

Gameday

+

Run the game-day view

+

+ Review lineups, check availability, and play the right walkup clips during the game. +

+
+ + Open Gameday + +
+
+
@@ -23,61 +48,36 @@ export function DashboardPage() { return (
-
-
-

Player dashboard

-

{walkup.nextGame ? formatGameTitle(walkup.nextGame) : "No upcoming game found yet."}

-

- {walkup.currentPlayer - ? `${formatMemberName(walkup.currentPlayer)} is ready for the selected team.` - : "Your TeamSnap user is connected, but no matching player record was found on the selected team."} -

-
-
-
+
-

Next game

- {walkup.nextGame ? ( - <> - {formatGameTitle(walkup.nextGame)} -
{formatGameDate(walkup.nextGame)}
- {walkup.nextGame.locationName ?
{walkup.nextGame.locationName}
: null} -
- +

Library

+

Manage walkup clips

+

+ Upload audio, trim clips, reorder them, and pin them to players before game day. +

+
+ + Open Library +
- - ) : ( -
No upcoming games were returned for this team.
- )}
-
+
-

Upcoming games

-
- {walkup.eventsQuery.isLoading ?
Loading games...
: null} - {walkup.games.slice(0, 8).map((game) => ( -
-
- {formatGameTitle(game)} -
{formatGameDate(game)}
-
- {String(game.id) === String(walkup.nextGame?.id) ? "Next" : "Browse"} +

Gameday

+

Run the game-day view

+

+ Review lineups, check availability, and play the right walkup clips during the game. +

+
+ + Open Gameday +
- ))} - {!walkup.eventsQuery.isLoading && !walkup.games.length ? ( -
No games were returned for the selected team.
- ) : null} -
diff --git a/frontend/src/pages/ProfilePage.tsx b/frontend/src/pages/ProfilePage.tsx index 0edb0bf..fd829dd 100644 --- a/frontend/src/pages/ProfilePage.tsx +++ b/frontend/src/pages/ProfilePage.tsx @@ -25,16 +25,6 @@ export function ProfilePage() { return (
-
-
-

Profile

-

{walkup.hasSelectedTeam ? formatTeamLabel(walkup.selectedTeam) : "Choose your team"}

-

- Session details and the selected team live here. The team choice is stored on this device and reused on the - next visit. -

-
-