Add Polymarket page and FIFA player headshots#2
Open
x-du wants to merge 11 commits into
Open
Conversation
Add a Market tab showing live World Cup winner odds from Polymarket's public API, fetched in CI into static market-odds.json (no runtime third-party requests). Includes win-chance/market-price/24h table, localized copy across all 23 languages, and a reusable InfoDot tooltip alignment fix so header popovers render above the table. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
@tomchen could you take a look when you get a chance? Thanks! |
Show official digitalhub.fifa.com portrait URLs on team pages with a redesigned squad card (number inline with name, full-height photo on the right). Add a static player-photos.json lookup built via --fetch-photos; the default update run only re-applies existing links and preserves them across wiki squad refreshes. Co-authored-by: Cursor <cursoragent@cursor.com>
Point deploy.yml at the feature branch so the fork can publish player headshots without merging to main. Leave update-data.yml on main unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the existing cron grid and cron-guard logic unchanged, but commit refreshed JSON to feat/player-photos and redeploy Pages from that branch. Co-authored-by: Cursor <cursoragent@cursor.com>
Bring player photo URLs from FIFA Digital Hub into squad data and show official headshots on team pages, without changing GitHub Actions workflows. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--fetch-photosrefresh), stored inplayer-photos.json, and linked directly from squad data — no image downloads, no runtime third-party requests beyond<img>loads fromdigitalhub.fifa.com.Polymarket (Market tab)
scripts/update.mjs: newfetchMarketOdds()step maps Polymarket team labels to FIFA codes, normalizes prices to sum to 100%, and recordspolymarket.comas a data source. The fetch is non-blocking — a failure preserves the previous JSON.src/pages/Polymarket.tsx+polymarket.css: new lazily-loaded route/polymarket, wired intoApp.tsx,Layout.tsx(nav), andMore.tsx.src/data/DataContext.tsx: lazyloadMarketOdds()loader;src/types.ts:MarketOdds/MarketOutcomeinterfaces.InfoDot: optionalalignprop + global tooltip CSS so header popovers render above the table and stay on-screen near edges.Player photos (team pages)
scripts/update.mjs:fetchFifaPhotos()(with--fetch-photos) pullsPlayerPicture.PictureUrlfromapi.fifa.com; normal updates apply URLs frompublic/data/player-photos.jsonvia shirt-number join.public/data/player-photos.json: ~1,247 FIFA player id → Digital Hub URL lookup;"photo"field stamped on each squad player.src/pages/TeamDetail.tsx+teamdetail.css: horizontal player cards with full-height headshot column;fifaPhotoUrl()adds on-the-fly crop/size transform params.index.html: CSPimg-srcallowshttps://digitalhub.fifa.com.Test plan
tsc -band Biome pass./polymarketwithout console/page errors./team/BRA) — player avatars load from Digital Hub; initials fallback when missing.market-odds.json; runnode scripts/update.mjs --fetch-photoslocally to refresh photo lookup when needed.