Skip to content

feat: implement issues #1113-#1116 — LoadingSkeleton variants, useMarkets, useMarket, useMarketBets - #1155

Merged
Ehonrie merged 2 commits into
Netwalls:mainfrom
Johnero542:feature/issues-1113-1116-skeleton-and-hooks
Jul 27, 2026
Merged

feat: implement issues #1113-#1116 — LoadingSkeleton variants, useMarkets, useMarket, useMarketBets#1155
Ehonrie merged 2 commits into
Netwalls:mainfrom
Johnero542:feature/issues-1113-1116-skeleton-and-hooks

Conversation

@Johnero542

Copy link
Copy Markdown
Contributor

#1113 — LoadingSkeleton: add card/row/detail variants that mirror the exact dimensions of MarketCard, PortfolioTable rows, and MarketDetailClient layout, preventing layout shift. Legacy table/chart variants retained for back-compat.

#1114 — useMarkets: expose configurable pollingInterval option (default 30 s), pause polling when the browser tab is backgrounded (document.visibilityState), keep isLoading/error/refetch surface unchanged.

#1115 — useMarket: guarantee market field is null while loading and on any error (including 404), reset to null immediately on market_id change so consumers never render stale data.

#1116 — useMarketBets: new hook that fetches bets for a market and sorts them most-recent-first by placedAt before returning. Includes test suite and shared mockFetchMarketBets / OLDER_BET fixture in mockApiClient.
Closes #1113
Closes #1114
Closes #1115
Closes #1116

Johnero542 and others added 2 commits July 26, 2026 07:52
…variants, useMarkets, useMarket, useMarketBets

Netwalls#1113 — LoadingSkeleton: add card/row/detail variants that mirror the exact
dimensions of MarketCard, PortfolioTable rows, and MarketDetailClient layout,
preventing layout shift. Legacy table/chart variants retained for back-compat.

Netwalls#1114 — useMarkets: expose configurable pollingInterval option (default 30 s),
pause polling when the browser tab is backgrounded (document.visibilityState),
keep isLoading/error/refetch surface unchanged.

Netwalls#1115 — useMarket: guarantee market field is null while loading and on any
error (including 404), reset to null immediately on market_id change so
consumers never render stale data.

Netwalls#1116 — useMarketBets: new hook that fetches bets for a market and sorts them
most-recent-first by placedAt before returning. Includes test suite and
shared mockFetchMarketBets / OLDER_BET fixture in mockApiClient.
@Ehonrie
Ehonrie merged commit cd8e1c6 into Netwalls:main Jul 27, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F-18: Implement useMarketBets hook F-17: Implement useMarket hook F-16: Implement useMarkets hook F-15: Build LoadingSkeleton variants

2 participants