mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-14 06:41:01 +00:00
c71ddb6e0d
- Clone Polkadot.js Apps repository - Update package.json with Pezkuwi branding - Add Pezkuwi endpoint to production chains (wss://pezkuwichain.app:9944) - Create comprehensive README for SDK UI - Set up project structure with all packages Next steps: - Apply Kurdistan colors (Kesk, Sor, Zer, Spi + Black) to UI theme - Replace logos with Pezkuwi branding - Test build and deployment
80 lines
1.9 KiB
TypeScript
80 lines
1.9 KiB
TypeScript
// Copyright 2017-2025 @polkadot/app-staking-async authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { AppProps as Props } from '@polkadot/react-components/types';
|
|
|
|
import React from 'react';
|
|
|
|
import { styled } from '@polkadot/react-components';
|
|
import { useStakingAsyncApis } from '@polkadot/react-hooks';
|
|
|
|
import StakingRelayApp from './Relay/index.js';
|
|
import StakingSystemApp from './System/index.js';
|
|
|
|
function StakingApp ({ basePath, className = '', onStatusChange }: Props): React.ReactElement<Props> {
|
|
const { ahApi, ahEndPoints, isRelayChain, rcApi, rcEndPoints } = useStakingAsyncApis();
|
|
|
|
return (
|
|
<StyledMain className={`${className} staking--App`}>
|
|
{isRelayChain
|
|
? (
|
|
<StakingRelayApp
|
|
ahApi={ahApi}
|
|
ahEndPoints={ahEndPoints}
|
|
basePath={basePath}
|
|
isRelayChain={isRelayChain}
|
|
onStatusChange={onStatusChange}
|
|
rcApi={rcApi}
|
|
rcEndPoints={rcEndPoints}
|
|
/>
|
|
)
|
|
: (
|
|
<StakingSystemApp
|
|
ahApi={ahApi}
|
|
ahEndPoints={ahEndPoints}
|
|
basePath={basePath}
|
|
isRelayChain={isRelayChain}
|
|
onStatusChange={onStatusChange}
|
|
rcApi={rcApi}
|
|
rcEndPoints={rcEndPoints}
|
|
/>
|
|
)
|
|
}
|
|
</StyledMain>
|
|
);
|
|
}
|
|
|
|
const StyledMain = styled.main`
|
|
.staking--Chart {
|
|
margin-top: 1.5rem;
|
|
|
|
h1 {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.ui--Spinner {
|
|
margin: 2.5rem auto;
|
|
}
|
|
}
|
|
|
|
.staking--optionsBar {
|
|
margin: 0.5rem 0 1rem;
|
|
text-align: center;
|
|
white-space: normal;
|
|
|
|
.staking--buttonToggle {
|
|
display: inline-block;
|
|
margin-right: 1rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
}
|
|
|
|
.ui--Expander.stakeOver {
|
|
.ui--Expander-summary {
|
|
color: var(--color-error);
|
|
}
|
|
}
|
|
`;
|
|
|
|
export default React.memo(StakingApp);
|