Frontend minor cleanups: unused imports, memoization, query key constants #19

Closed
opened 2026-02-08 06:44:20 -08:00 by kyle · 1 comment
Owner

Context: Several small cleanup opportunities:

  1. Unused/redundant imports in EventForm.tsx and EventList.tsx
  2. Missing useMemo for VIP name transformation in EventForm.tsx (line 222-225)
  3. Inline onClick handlers creating new function references on every render (multiple list pages)
  4. Query keys hardcoded as string literals across files - should be constants
  5. Inconsistent filter button styling (bg-background vs bg-card) across list pages

Files affected:

  • frontend/src/components/EventForm.tsx (lines 1-4, 222-225)
  • frontend/src/pages/EventList.tsx (lines 1-10)
  • All list pages (query keys, inline handlers)
  • frontend/src/pages/VipList.tsx (line 293) vs DriverList.tsx (line 307)

Suggested fix:

  • Remove unused imports
  • Wrap expensive computations in useMemo
  • Create frontend/src/lib/query-keys.ts with typed query key constants
  • Standardize filter button styling

Effort: Trivial

**Context:** Several small cleanup opportunities: 1. Unused/redundant imports in EventForm.tsx and EventList.tsx 2. Missing `useMemo` for VIP name transformation in EventForm.tsx (line 222-225) 3. Inline onClick handlers creating new function references on every render (multiple list pages) 4. Query keys hardcoded as string literals across files - should be constants 5. Inconsistent filter button styling (`bg-background` vs `bg-card`) across list pages **Files affected:** - `frontend/src/components/EventForm.tsx` (lines 1-4, 222-225) - `frontend/src/pages/EventList.tsx` (lines 1-10) - All list pages (query keys, inline handlers) - `frontend/src/pages/VipList.tsx` (line 293) vs `DriverList.tsx` (line 307) **Suggested fix:** - Remove unused imports - Wrap expensive computations in `useMemo` - Create `frontend/src/lib/query-keys.ts` with typed query key constants - Standardize filter button styling **Effort:** Trivial
Author
Owner

Created with centralized constants. Cleaned up unused imports, added useMemo, standardized filter button styling.

Created with centralized constants. Cleaned up unused imports, added useMemo, standardized filter button styling.
kyle closed this issue 2026-02-08 07:09:58 -08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kyle/vip-coordinator#19