fork-gauge
Fork Gauge
The fork gauge is the primary visual indicator of Augur fork risk on the site. It consists of an SVG half-circle arc with a needle, a gradient color track, and a risk label — all driven by live blockchain data fetched from /data/fork-risk.json.
Component Architecture
ForkMonitor (island entry point, client:load)
└── ForkDataProvider (React Context — loads live data)
└── ForkMockProvider (React Context — demo overrides, dev-only)
└── ForkDisplay (subscribes to contexts + animation store)
└── ForkGauge (pure SVG renderer, takes percentage prop)
ForkMonitor— The Astro island. Always useclient:loadso the gauge hydrates immediately.ForkDataProvider— Fetches/data/fork-risk.jsonon mount, refreshes every 5 minutes. Exposes data viauseForkData().ForkMockProvider— Dev-only demo layer. WrapsForkDataProviderand can override data viagenerateScenario(). Guarded byimport.meta.env.PROD.ForkDisplay— Composes the full UI. Subscribes to$appStore(animation state) anduseForkData()(risk data).ForkGauge— Pure SVG component. Receivespercentageprop (0–100). No data fetching, no context.
More from augurproject/augur-reboot-website
astro-dev
Comprehensive Astro development with React, Tailwind v4, and Cloudflare Workers deployment
13blogging
This skill should be used when the user asks to "add a blog post", "create a new post", "write a learn article", "publish an update", "add content to the learn section", "update the blog", or needs help with MDX content, frontmatter, or the content collection structure.
1island-state
This skill should be used when the user asks to "add global state", "create a store", "use Nanostores", "share state between components", "manage reactive state", "add a provider", "create a context", "initialize state", or needs help with state management patterns across React islands in this static site.
1