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-match-card-adapter

Match Card Adapter (Mr. Doge SDK)

mrdoge-ui/mrdoge-match-card-adapter
FreeUtility

Maps a real matches.get()/odds.list() response onto Match Card's props.

Install it

npx shadcn@latest add https://mrdoge.co/r/mrdoge-match-card-adapter.json

Source

lib/mrdoge-adapters/match-card.tsmrdoge.co/r/mrdoge-match-card-adapter.json
1import type { MatchDetail, Market } from "@mrdoge/protocol"
2import type {
3 MatchCardDataProps,
4 MatchCardOdds,
5 MatchCardStatus,
6} from "@/registry/mrdoge-ui/match-card/match-card"
7import type { OddsOption, OddsMovement } from "@/registry/mrdoge-ui/odds-selector/odds-selector"
8
9// match.status (upcoming/live/completed) is the authoritative field, always
10// kept fresh by the server. Clock.state is finer (adds paused/intermission/
11// interrupted) but comes from the live-stats feed, which can stop updating
12// once a match ends, e.g. frozen on "live" at "90+5'" instead of ever
13// transitioning to "finished". So match.status decides the coarse bucket
14// first; clock.state only refines *within* "live".
15function toMatchCardStatus(match: MatchDetail): MatchCardStatus {
16 if (match.status === "upcoming") return "scheduled"
17 if (match.status === "completed") return "finished"
18 return match.stats?.clock?.state ?? "live"
19}
20
21// Outcome order (1/X/2 left-to-right, Over before Under, ...) is decided
22// server-side: the SDK gateway orders every market's lines before they
23// ever reach here, so there's nothing to sort in this adapter.
24//
25// Odds Selector's own examples have room for real team names; Match
26// Card is a lot narrower, so it asks for "code" instead (1/X/2), short
27// and never needs truncating.
28export function toOddsOptions(
29 market?: Market,
30 {
31 labelFrom = "caption",
32 movementById,
33 }: {
34 labelFrom?: "caption" | "code"
35 /** From useOddsMovement(market): id -> "up" | "down" since the previous snapshot. */
36 movementById?: Record<string, OddsMovement>
37 } = {}
38): OddsOption[] {
39 if (!market) return []
40 return market.lines.map((line) => ({
41 id: line.id,
42 label: labelFrom === "code" ? line.code : (line.caption ?? line.code),
43 price: line.price.toFixed(2),
44 suspended: !line.isAvailable,
45 movement: movementById?.[line.id],
46 }))
47}
48
49function toMatchCardOdds(
50 market?: Market,
51 movementById?: Record<string, OddsMovement>
52): MatchCardOdds | undefined {
53 if (!market) return undefined
54 return {
55 market: market.displayName,
56 options: toOddsOptions(market, { labelFrom: "code", movementById }),
57 }
58}
59
60// Public, unauthenticated, cached CDN. Not part of the Team shape itself.
61// See /docs/reference/images.
62export function teamLogoUrl(teamId: number) {
63 return `https://api.mrdoge.co/images/teams/${teamId}.png`
64}
65
66/**
67 * Maps a real `matches.get()` / `matches.subscribe()` response (plus an
68// … truncated

What it pulls in

npm packages

  • @mrdoge/protocol

Other registry items

  • match-card

Files it writes

  • lib/mrdoge-adapters/match-card.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
Bet Slip Adapter (Mr. Doge SDK)mrdoge-bet-slip-adaptermrdoge-uiUtilitiesFree1 dep
Mr. Doge Clientmrdoge-clientmrdoge-uiUtilitiesFree1 dep
Conflict Adapter (Mr. Doge SDK)mrdoge-conflict-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