As a user, clicking the EuchreCamp wordmark when logged in should take me to my homepage #24

Closed
opened 2026-04-19 04:26:08 +00:00 by david · 1 comment
Owner

Description

Currently, clicking the EuchreCamp wordmark in the navigation bar always links to / (the public homepage showing Top 10 players, recent tournament, and club info). This is the correct behavior for unauthenticated users, but logged-in users should be directed to a more relevant page.

Acceptance Criteria

  1. Unauthenticated users: Wordmark links to / (public homepage with Top 10 players, recent tournament, club info, Sign In/Create Account buttons)
  2. Authenticated players: Wordmark links to /players/{playerId}/profile (their player profile)
  3. Authenticated admins (club_admin/site_admin): Wordmark links to /admin (admin dashboard)

Current Behavior

  • src/components/Navigation.tsx:46 - Wordmark always links to href="/" regardless of login state
  • src/app/page.tsx - Homepage shows public content even when logged in

Implementation Notes

  • Need to determine user role from session
  • Need to determine playerId from user's session
  • Navigation component is a client component that already fetches user role
  • The admin page (src/app/admin/page.tsx:44) already has logic to redirect users to their player profile if they have a playerId
## Description Currently, clicking the EuchreCamp wordmark in the navigation bar always links to `/` (the public homepage showing Top 10 players, recent tournament, and club info). This is the correct behavior for unauthenticated users, but logged-in users should be directed to a more relevant page. ## Acceptance Criteria 1. **Unauthenticated users**: Wordmark links to `/` (public homepage with Top 10 players, recent tournament, club info, Sign In/Create Account buttons) 2. **Authenticated players**: Wordmark links to `/players/{playerId}/profile` (their player profile) 3. **Authenticated admins (club_admin/site_admin)**: Wordmark links to `/admin` (admin dashboard) ## Current Behavior - `src/components/Navigation.tsx:46` - Wordmark always links to `href="/"` regardless of login state - `src/app/page.tsx` - Homepage shows public content even when logged in ## Implementation Notes - Need to determine user role from session - Need to determine playerId from user's session - Navigation component is a client component that already fetches user role - The admin page (`src/app/admin/page.tsx:44`) already has logic to redirect users to their player profile if they have a playerId
david closed this issue 2026-04-27 02:56:37 +00:00
Author
Owner

Closed - Fully Implemented

The wordmark navigation feature is fully implemented:

  • src/app/wordmark-redirect/route.ts - Server-side redirect based on user role
  • src/components/Navigation.tsx:46 - Wordmark links to /wordmark-redirect
  • e2e/cucumber/features/wordmark-navigation.feature - 3 Cucumber scenarios, all passing

Verified with Cucumber tests:

  • Unauthenticated user → public homepage /
  • Authenticated player → /players/{playerId}/profile
  • Authenticated admin → /admin

Merged via PR #27 (bb6be24).

✅ **Closed - Fully Implemented** The wordmark navigation feature is fully implemented: - `src/app/wordmark-redirect/route.ts` - Server-side redirect based on user role - `src/components/Navigation.tsx:46` - Wordmark links to `/wordmark-redirect` - `e2e/cucumber/features/wordmark-navigation.feature` - 3 Cucumber scenarios, all passing Verified with Cucumber tests: - Unauthenticated user → public homepage `/` - Authenticated player → `/players/{playerId}/profile` - Authenticated admin → `/admin` Merged via PR #27 (bb6be24).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: david/euchre_camp#24