mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-11-03 22:51:06 +00:00
32 lines
795 B
TypeScript
32 lines
795 B
TypeScript
// Copyright 2017-2026 @pezkuwi/app-nis authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { QueueTotal } from './types.js';
|
|
|
|
import React from 'react';
|
|
|
|
import { Table } from '@pezkuwi/react-components';
|
|
import { FormatBalance } from '@pezkuwi/react-query';
|
|
import { formatNumber } from '@pezkuwi/util';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
value: QueueTotal;
|
|
}
|
|
|
|
function Queue ({ className, value: { balance, index, numItems } }: Props): React.ReactElement<Props> {
|
|
return (
|
|
<tr className={className}>
|
|
<Table.Column.Id value={index} />
|
|
<td className='number all'>
|
|
{formatNumber(numItems)}
|
|
</td>
|
|
<td className='number'>
|
|
<FormatBalance value={balance} />
|
|
</td>
|
|
</tr>
|
|
);
|
|
}
|
|
|
|
export default React.memo(Queue);
|