From 55828e9f42d9343d71980cfcfd930deeadb817fd Mon Sep 17 00:00:00 2001
From: Chris Parsons <438676+chrisparsons83@users.noreply.github.com>
Date: Fri, 15 May 2026 16:04:07 -0700
Subject: [PATCH] Simplify sports season display and add local timezone hints
(#434)
* Show season name instead of year/bracket format; add local timezone hint to draft time
Replace the raw year number and scoringType string in the league creation
sport picker, review step, and league settings sports section with the
human-readable season name (e.g. "2025 NBA Season"), matching how the
league homepage sports list already displays seasons.
Add a client-side local timezone label below the draft date & time fields
on both the league creation wizard and the league settings page, so users
know that draft times are in their local timezone.
https://claude.ai/code/session_01GtJowGruAc1A4jURkSDVjX
* Address code review: shared tz hook, short abbrev, sort fix, dead type cleanup, test update
- Extract timezone detection into useLocalTimezone hook to avoid duplication
across DraftSetupSection and Step3DraftSettings
- Use Intl short timezone abbreviation (e.g. "EST") instead of raw IANA name,
matching DraftInfoCard's existing pattern
- Sort review step sport list by season name instead of sport.name so the
visible order matches the displayed text
- Remove unused scoringType and year fields from SportsSection's local type
- Update SportsSection tests to use realistic season names and the new
display format
https://claude.ai/code/session_01GtJowGruAc1A4jURkSDVjX
---------
Co-authored-by: Claude
---
.../league/settings/DraftSetupSection.tsx | 4 ++++
app/components/league/settings/SportsSection.tsx | 5 +----
.../settings/__tests__/SportsSection.test.tsx | 16 +++++-----------
app/hooks/useLocalTimezone.ts | 10 ++++++++++
app/routes/leagues/new.tsx | 12 ++++++++----
5 files changed, 28 insertions(+), 19 deletions(-)
create mode 100644 app/hooks/useLocalTimezone.ts
diff --git a/app/components/league/settings/DraftSetupSection.tsx b/app/components/league/settings/DraftSetupSection.tsx
index eeaec80..5f44905 100644
--- a/app/components/league/settings/DraftSetupSection.tsx
+++ b/app/components/league/settings/DraftSetupSection.tsx
@@ -1,4 +1,5 @@
import { Swords, CalendarIcon } from "lucide-react";
+import { useLocalTimezone } from "~/hooks/useLocalTimezone";
import { format } from "date-fns";
import { Label } from "~/components/ui/label";
import { Input } from "~/components/ui/input";
@@ -64,6 +65,8 @@ export function DraftSetupSection({
onOvernightTimezoneChange: (v: string) => void;
commishTimezone: string | null;
}) {
+ const localTz = useLocalTimezone();
+
return (
Set this before starting the draft room.
+ {localTz && <> Times are in your local timezone ({localTz}).>}