mirror of
https://github.com/pezkuwichain/pezkuwi-sdk-ui.git
synced 2026-07-12 22:45:45 +00:00
d949863789
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>
36 lines
738 B
TypeScript
36 lines
738 B
TypeScript
// Copyright 2017-2026 @pezkuwi/react-components authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import React, { useCallback } from 'react';
|
|
|
|
import AddressToggle from '../AddressToggle.js';
|
|
|
|
interface Props {
|
|
address: string;
|
|
filter?: string;
|
|
isHidden?: boolean;
|
|
onDeselect: (address: string) => void;
|
|
}
|
|
|
|
function Selected ({ address, filter, isHidden, onDeselect }: Props): React.ReactElement<Props> | null {
|
|
const onChange = useCallback(
|
|
() => onDeselect(address),
|
|
[address, onDeselect]
|
|
);
|
|
|
|
if (isHidden) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<AddressToggle
|
|
address={address}
|
|
filter={filter}
|
|
noToggle
|
|
onChange={onChange}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default React.memo(Selected);
|