mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-07-24 08:55:51 +00:00
feat: initial Pezkuwi Apps rebrand from polkadot-apps
Rebranded terminology: - Polkadot → Pezkuwi - Kusama → Dicle - Westend → Zagros - Rococo → PezkuwiChain - Substrate → Bizinikiwi - parachain → teyrchain Custom logos with Kurdistan brand colors (#e6007a → #86e62a): - bizinikiwi-hexagon.svg - sora-bizinikiwi.svg - hezscanner.svg - heztreasury.svg - pezkuwiscan.svg - pezkuwistats.svg - pezkuwiassembly.svg - pezkuwiholic.svg
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
// Copyright 2017-2025 @pezkuwi/app-nfts authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { BN } from '@pezkuwi/util';
|
||||
import type { CollectionInfo } from '../types.js';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { AddressSmall, IconLink, Table } from '@pezkuwi/react-components';
|
||||
import { formatNumber } from '@pezkuwi/util';
|
||||
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
value: CollectionInfo;
|
||||
}
|
||||
|
||||
function Collection ({ className, value: { details, id, ipfsData } }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const name = ipfsData?.name || '';
|
||||
let imageLink = '';
|
||||
|
||||
if (ipfsData?.image) {
|
||||
imageLink = ipfsData.image.toLowerCase().startsWith('http') ? ipfsData.image : `https://ipfs.io/ipfs/${ipfsData.image}`;
|
||||
}
|
||||
|
||||
return (
|
||||
<tr className={className}>
|
||||
<Table.Column.Id value={id} />
|
||||
<td className='together all'>
|
||||
{ name && imageLink
|
||||
? (
|
||||
<IconLink
|
||||
href={imageLink}
|
||||
icon='braille'
|
||||
label={name}
|
||||
rel='noopener'
|
||||
target='_blank'
|
||||
/>)
|
||||
: name
|
||||
}
|
||||
</td>
|
||||
<td className='address media--1000'>{details && <AddressSmall value={details.owner} />}</td>
|
||||
<td className='string'>{details && details.isFrozen.isTrue && t('Frozen')}</td>
|
||||
<td className='number'>{details && formatNumber(details.items || (details as unknown as { instances: BN }).instances)}</td>
|
||||
</tr>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(Collection);
|
||||
Reference in New Issue
Block a user