mirror of
https://github.com/pezkuwichain/pezkuwi-sdk-ui.git
synced 2026-07-24 02:55:42 +00:00
Initial commit: Pezkuwi SDK UI
Comprehensive web interface for interacting with Pezkuwi blockchain. Features: - Blockchain explorer - Wallet management - Staking interface - Governance participation - Developer tools Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
// Copyright 2017-2026 @pezkuwi/app-coretime authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PhaseConfig } from '../types.js';
|
||||
|
||||
import React, { useRef } from 'react';
|
||||
|
||||
import { styled, Table } from '@pezkuwi/react-components';
|
||||
import { formatNumber } from '@pezkuwi/util';
|
||||
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
interface Props {
|
||||
phaseInfo: PhaseConfig['config'][keyof PhaseConfig['config']]
|
||||
}
|
||||
|
||||
const StyledTable = styled(Table)`
|
||||
border-collapse: collapse;
|
||||
|
||||
tr:last-child {
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
`;
|
||||
|
||||
function SaleTable ({ phaseInfo }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const headerRef = useRef<([React.ReactNode?, string?, number?] | false)[]>([
|
||||
[],
|
||||
[t('Dates'), 'start media--800'],
|
||||
[t('Blocks (relay)'), 'start'],
|
||||
[t('Timeslices'), 'start']
|
||||
]);
|
||||
|
||||
return (
|
||||
<div style={{ maxWidth: '500px' }}>
|
||||
<StyledTable
|
||||
emptySpinner={false}
|
||||
header={headerRef.current}
|
||||
isSplit={false}
|
||||
>
|
||||
<tr>
|
||||
<td style={{ width: '100px' }}>Start</td>
|
||||
<td>{phaseInfo.start.date}</td>
|
||||
<td>{formatNumber(phaseInfo.start.blocks.relay)}</td>
|
||||
<td>{formatNumber(phaseInfo.start.ts)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{ width: '100px' }}>End</td>
|
||||
<td>{phaseInfo.end.date}</td>
|
||||
<td>{formatNumber(phaseInfo.end.blocks.relay)}</td>
|
||||
<td>{formatNumber(phaseInfo.end.ts)}</td>
|
||||
</tr>
|
||||
|
||||
</StyledTable>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(SaleTable);
|
||||
Reference in New Issue
Block a user