MDK Logo
ReferenceUI KitReactUI Kit foundationComponentsDashboards

PoolManagerDashboard

Landing page for the Pool Manager: site-level stats, primary navigation blocks, and a compact recent-alerts list.

Landing page for the Pool Manager: site-level stats, primary navigation blocks, and a compact recent-alerts list.

import { PoolManagerDashboard } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
statsOptionalDashboardStats | undefined
isStatsLoadingOptionalboolean | undefined
alertsOptionalAlert[] | undefined
onNavigationClickRequired(url: string) => void
onViewAllAlertsRequiredVoidFunction

Usage

Landing page for the Pool Manager: site-level stats, primary navigation blocks, and a compact recent-alerts list.

Data contracts

  • DashboardStats — declared in dashboard-types.ts alongside the component.
  • Alertfoundation/types/device (same shape as ActiveIncidentsCard consumes).

Notes

  • Navigation blocks are static (navigationBlocks constant) — extend the constant to add or rename sections.
  • For a more compact recent-alerts list elsewhere on the page, prefer ActiveIncidentsCard.

Example

/** * Runnable example for PoolManagerDashboard. */import { type DashboardStats, PoolManagerDashboard } from '@tetherto/mdk-react-devkit'const mockStats: DashboardStats = {  items: [    { label: 'Active workers', value: 1234 },    { label: 'Hashrate', value: 102.4, secondaryValue: 'TH/s' },    { label: 'Online miners', value: 456, secondaryValue: '/ 512', type: 'SUCCESS' },  ],}const mockAlerts = [  {    severity: 'critical',    description: 'Miner offline',    code: '001',    createdAt: Date.now() - 5 * 60 * 1000,    name: 'miner_offline',  },  {    severity: 'warning',    description: 'Container temp >78°C',    code: '002',    createdAt: Date.now() - 30 * 60 * 1000,    name: 'temp_high',  },]export const PoolManagerDashboardExample = () => {  return (    <PoolManagerDashboard      stats={mockStats}      alerts={mockAlerts as never}      onNavigationClick={(url) => {        // eslint-disable-next-line no-console        console.log(`navigate to ${url}`)      }}      onViewAllAlerts={() => {        // eslint-disable-next-line no-console        console.log('view all alerts')      }}    />  )}