import React, { useEffect } from "react"; import { useDevice } from "@core/providers/useDevice.js"; export const ConfiguringWidget = (): JSX.Element => { const { hardware, channels, config, moduleConfig, setReady, nodes, connection, } = useDevice(); useEffect(() => { if ( hardware.myNodeNum !== 0 && Object.keys(config).length === 7 && Object.keys(moduleConfig).length === 7 && channels.length === hardware.maxChannels ) { setReady(true); } }, [ config, moduleConfig, channels, hardware.maxChannels, hardware.myNodeNum, setReady, ]); return (

Connecting to device

{ void connection?.configure(); }} > Retry
); }; export interface StatusIndicatorProps { title: string; current: number; total: number; } const StatusIndicator = ({ title, current, total, }: StatusIndicatorProps): JSX.Element => { return (
  • = total ? "bg-green-500" : "bg-[#f9e3aa]" }`} />
    = total ? "bg-green-500 border-green-500" : "bg-[#f9e3aa] border-green-500" }`} > 0 ? "bg-green-500" : "bg-[#f9e3aa]" }`} />
    {title} ({current} {total !== 0 && `/${total}`})
  • ); };