mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
## Summary
- Fix bug where clicking "Review Lyrics" or "Select Instrumental" from
the job list showed "Page not found" but reloading worked
- Changed from Next.js `Link` to regular `<a>` tags for hash-based URLs
## Root Cause
Next.js `Link` uses `history.pushState` for client-side navigation,
which doesn't trigger the `hashchange` event. The client.tsx component's
hash state wasn't updating when navigating.
## Solution
Use regular `<a>` tags for hash URLs (`/app/jobs#/{jobId}/review`). When
clicking an `<a>` tag with a hash URL on the same page, the browser:
1. Updates the hash without reloading
2. Fires the `hashchange` event
3. Our listener updates state
4. Component re-renders with correct route
## Test plan
- [x] Unit tests pass
- [ ] Manual test: Click "Review Lyrics" from job list - should navigate
correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
@coderabbitai ignore
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2 lines
52 B
TypeScript
2 lines
52 B
TypeScript
/// <reference types="@testing-library/jest-dom" />
|