AddReplaceMinerDialog
Modal for adding a new miner to a slot or swapping the existing one with a replacement unit.
Modal for adding a new miner to a slot or swapping the existing one with a replacement unit.
import { AddReplaceMinerDialog } from "@tetherto/mdk-react-devkit";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
open | Required | boolean | — | — |
onClose | Required | VoidFunction | — | — |
selectedSocketToReplace | Optional | UnknownRecord | undefined | — | — |
selectedEditSocket | Optional | UnknownRecord | undefined | — | — |
currentDialogFlow | Optional | string | undefined | — | — |
isDirectToMaintenanceMode | Optional | boolean | undefined | — | — |
minersType | Optional | string | undefined | — | — |
isContainerEmpty | Optional | boolean | undefined | — | — |
Usage
Modal for adding a new miner to an empty slot or swapping the existing unit with a replacement. Orchestrates the add/replace/maintenance flow.
Minimal example
import { AddReplaceMinerDialog } from "@tetherto/mdk-react-devkit";
<AddReplaceMinerDialog
open={isOpen}
onClose={() => setIsOpen(false)}
/>
Example
import { useState } from 'react'import { AddReplaceMinerDialog } from '@tetherto/mdk-react-devkit'export const AddReplaceMinerDialogExample = () => { const [open, setOpen] = useState(false) return ( <div className="mdk-example-row"> <button onClick={() => setOpen(true)}>Add / Replace Miner</button> <AddReplaceMinerDialog open={open} onClose={() => setOpen(false)} /> </div> )}