BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/mrdoge-ui/mrdoge-bet-slip-adapter

Bet Slip Adapter (Mr. Doge SDK)

mrdoge-ui/mrdoge-bet-slip-adapter
FreeUtility

Builds a BetSlipPick from a real match, one of its markets, and a selected line id.

Install it

npx shadcn@latest add https://mrdoge.co/r/mrdoge-bet-slip-adapter.json

Source

lib/mrdoge-adapters/bet-slip.tsmrdoge.co/r/mrdoge-bet-slip-adapter.json
1import type { MatchDetail, Market } from "@mrdoge/protocol"
2import type { BetSlipPick } from "@/registry/mrdoge-ui/bet-slip/bet-slip"
3import type { OddsMovement } from "@/registry/mrdoge-ui/odds-selector/odds-selector"
4
5// Over/Under outcomes only carry a generic "O"/"U" code, no threshold in
6// it. The threshold lives in the caption instead ("Over 1.5", "Under
7// 1.5"), so that's what has to be parsed for conflict-checking.
8function parseThreshold(caption: string | null | undefined): number | undefined {
9 const match = caption?.match(/[\d.]+/)
10 const value = match ? parseFloat(match[0]) : NaN
11 return Number.isNaN(value) ? undefined : value
12}
13
14// Public, unauthenticated, cached CDN. Not part of the Team shape itself.
15// See /docs/reference/images.
16function teamLogoUrl(teamId: number) {
17 return `https://api.mrdoge.co/images/teams/${teamId}.png`
18}
19
20/**
21 * Builds a `BetSlipPick` from a real match, one of its markets, and a
22 * selected line id. A pick is basically a selected odds line. Returns
23 * `undefined` if `lineId` isn't found in `market.lines`; filter those out
24 * when mapping several selections at once.
25 *
26 * `movementById` is optional. Pass `useOddsMovement(market)`'s result to
27 * color the pick's price as odds change; omit it and the price renders
28 * without any color change.
29 */
30export function toBetSlipPick(
31 match: MatchDetail,
32 market: Market,
33 lineId: string,
34 movementById?: Record<string, OddsMovement>
35): BetSlipPick | undefined {
36 const line = market.lines.find((l) => l.id === lineId)
37 if (!line) return undefined
38
39 const isTotals = line.code.startsWith("O") || line.code.startsWith("U")
40
41 return {
42 id: line.id,
43 eventLabel: `${match.homeTeam.name} vs ${match.awayTeam.name}`,
44 market: market.displayName,
45 selection: line.caption ?? line.code,
46 price: line.price,
47 movement: movementById?.[line.id],
48 unavailable: !line.isAvailable,
49 home: { name: match.homeTeam.name, logoUrl: teamLogoUrl(match.homeTeam.id) },
50 away: { name: match.awayTeam.name, logoUrl: teamLogoUrl(match.awayTeam.id) },
51 kickoff: match.startTime,
52 matchId: match.id,
53 betType: market.betType,
54 code: line.code,
55 threshold: isTotals ? parseThreshold(line.caption) : undefined,
56 }
57}

What it pulls in

npm packages

  • @mrdoge/protocol

Other registry items

  • bet-slip

Files it writes

  • lib/mrdoge-adapters/bet-slip.ts

Facts

Registry
mrdoge-ui
Type
registry:lib
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

mrdoge.co mrdogeco/docs on GitHub Raw registry item This item as JSON

More from mrdoge-ui

All 26 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Mr. Doge Clientmrdoge-clientmrdoge-uiUtilitiesFree1 dep
Conflict Adapter (Mr. Doge SDK)mrdoge-conflict-adaptermrdoge-uiUtilitiesFree1 dep
Match Card Adapter (Mr. Doge SDK)mrdoge-match-card-adaptermrdoge-uiUtilitiesFree1 dep
Match Highlight Adapter (Mr. Doge SDK)mrdoge-match-highlight-adaptermrdoge-uiUtilitiesFree1 dep
Match Timeline Adapter (Mr. Doge SDK)mrdoge-match-timeline-adaptermrdoge-uiUtilitiesFree1 dep
Odds Selector Adapter (Mr. Doge SDK)mrdoge-odds-selector-adaptermrdoge-uiUtilitiesFree1 dep
Stats List Adapter (Mr. Doge SDK)mrdoge-stats-list-adaptermrdoge-uiUtilitiesFree1 dep
Rate Limitrate-limitmrdoge-uiUtilitiesFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex