import React from 'react'; import { CircularProgressbar } from 'react-circular-progressbar'; import 'react-circular-progressbar/dist/styles.css'; import { PieChart } from 'react-minimal-pie-chart'; import 'react-confirm-alert/src/react-confirm-alert.css'; import Navbar from 'renderer/components/Navbar'; import { usePrinter } from 'hooks/usePrinter'; import { ErrorBoundary } from 'renderer/components/ErrrorBoundary'; function Printer() { const { loading, handlePrint, handleStop, isPrinting, start, reportStats, availableLabels, percent } = usePrinter() return (
{!start ? ( ) : ( <> {availableLabels <= 0 &&
Loading...
Waiting for new labels...
} )} {isPrinting && (
)}
{(reportStats.success > 0 || reportStats.failed > 0) && ( <>

Printer Analysis

`${dataEntry.value}`} radius={PieChart.defaultProps.radius - 6} lineWidth={60} segmentsStyle={{ transition: 'stroke .3s', cursor: 'pointer', }} animate labelPosition={100 - 60 / 2} labelStyle={{ fill: '#fff', opacity: 0.75, pointerEvents: 'none', }} /> )}
{/*
Version 1.0.4
*/}
); } export default Printer;