Summary
Generate shareable URLs for player stats and comparison views so users can share results with friends.
Details
URL Structure
- Player stats:
/player/{platform}/{gamertag} (already routable)
- Comparison:
/compare?p=uno:player1,xbl:player2,psn:player3
- Squad view:
/squad/{squadId}
Share Features
- Copy link button on player stats page and comparison page
- Uses
navigator.clipboard.writeText() with fallback
- Naive UI notification confirming "Link copied!"
- URL updates reactively as players are added/removed from comparison
Router Integration
- Comparison page reads
p query param on mount, parses players, fetches stats
- Player add/remove updates the URL query params (using
router.replace)
- Browser back/forward works correctly with comparison state
Acceptance Criteria
Summary
Generate shareable URLs for player stats and comparison views so users can share results with friends.
Details
URL Structure
/player/{platform}/{gamertag}(already routable)/compare?p=uno:player1,xbl:player2,psn:player3/squad/{squadId}Share Features
navigator.clipboard.writeText()with fallbackRouter Integration
pquery param on mount, parses players, fetches statsrouter.replace)Acceptance Criteria