mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-06-20 02:21:06 +00:00
d21bfb1320
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
62 lines
1.8 KiB
TypeScript
62 lines
1.8 KiB
TypeScript
// Copyright 2017-2025 @pezkuwi/app-teyrchains authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { AuctionInfo, Campaigns, LeasePeriod, OwnedId } from '../types.js';
|
|
|
|
import React from 'react';
|
|
|
|
import { Button, MarkWarning } from '@pezkuwi/react-components';
|
|
import { useBestNumber } from '@pezkuwi/react-hooks';
|
|
|
|
import { useTranslation } from '../translate.js';
|
|
import BannerAssetHubMigration from './BannerAssetHubMigration.js';
|
|
import FundAdd from './FundAdd.js';
|
|
import Funds from './Funds.js';
|
|
import Summary from './Summary.js';
|
|
|
|
interface Props {
|
|
auctionInfo?: AuctionInfo;
|
|
campaigns: Campaigns;
|
|
className?: string;
|
|
leasePeriod?: LeasePeriod;
|
|
ownedIds: OwnedId[];
|
|
}
|
|
|
|
function Crowdloan ({ auctionInfo, campaigns: { activeCap, activeRaised, funds, isLoading, totalCap, totalRaised }, className, leasePeriod, ownedIds }: Props): React.ReactElement<Props> {
|
|
const { t } = useTranslation();
|
|
const bestNumber = useBestNumber();
|
|
|
|
return (
|
|
<div className={className}>
|
|
<BannerAssetHubMigration />
|
|
<MarkWarning
|
|
className='warning centered'
|
|
content={t('Crowdloans will be deprecated in favor of Coretime. When Coretime is active in Pezkuwi, this page will be removed.')}
|
|
/>
|
|
<Summary
|
|
activeCap={activeCap}
|
|
activeRaised={activeRaised}
|
|
fundCount={funds?.length}
|
|
isLoading={isLoading}
|
|
totalCap={totalCap}
|
|
totalRaised={totalRaised}
|
|
/>
|
|
<Button.Group>
|
|
<FundAdd
|
|
auctionInfo={auctionInfo}
|
|
bestNumber={bestNumber}
|
|
leasePeriod={leasePeriod}
|
|
ownedIds={ownedIds}
|
|
/>
|
|
</Button.Group>
|
|
<Funds
|
|
bestNumber={bestNumber}
|
|
leasePeriod={leasePeriod}
|
|
value={funds}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default React.memo(Crowdloan);
|