mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-17 05:21:04 +00:00
971df8edba
- Remove all 3rd party parachain configurations from endpoints: - productionRelayPolkadot.ts: Keep only system parachains - productionRelayDicle.ts: Keep only system parachains - testingRelayZagros.ts: Keep only system parachains - testingRelayTeyrChain.ts: Keep only system parachains - Update domain references: - polkadot.js.org → pezkuwichain.app - wiki.polkadot.network → wiki.pezkuwichain.io - dotapps.io → pezkuwichain.app - statement.polkadot.network → docs.pezkuwichain.io/statement - support.polkadot.network → docs.pezkuwichain.io - Update repository references: - github.com/pezkuwi-js/apps → github.com/pezkuwichain/pwap - Rename system parachains to Pezkuwi ecosystem: - PolkadotAssetHub → PezkuwiAssetHub - polkadotBridgeHub → pezkuwiBridgeHub - polkadotCollectives → pezkuwiCollectives - polkadotCoretime → pezkuwiCoretime - polkadotPeople → pezkuwiPeople - Update network name in claims utility: - Polkadot → Pezkuwi
56 lines
1.3 KiB
TypeScript
56 lines
1.3 KiB
TypeScript
// Copyright 2017-2026 @pezkuwi/app-explorer authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import React, { useCallback, useState } from 'react';
|
|
|
|
import { Button, FilterOverlay, Input, styled } from '@pezkuwi/react-components';
|
|
|
|
import { useTranslation } from '../translate.js';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
onQuery?: (value: string) => void;
|
|
}
|
|
|
|
function Query ({ className = '', onQuery }: Props): React.ReactElement<Props> {
|
|
const { t } = useTranslation();
|
|
const [input, setInput] = useState('');
|
|
|
|
const _onChange = useCallback(
|
|
(value: string): void => setInput(value),
|
|
[]
|
|
);
|
|
|
|
const _onQuery = useCallback(
|
|
(): void => {
|
|
onQuery && onQuery(input);
|
|
},
|
|
[input, onQuery]
|
|
);
|
|
|
|
return (
|
|
<StyledFilterOverlay className={`${className} ui--FilterOverlay hasOwnMaxWidth`}>
|
|
<Input
|
|
className='asset--query'
|
|
onChange={_onChange}
|
|
onEnter={_onQuery}
|
|
placeholder={t('asset id or name to query')}
|
|
withLabel={false}
|
|
>
|
|
<Button
|
|
icon='play'
|
|
onClick={_onQuery}
|
|
/>
|
|
</Input>
|
|
</StyledFilterOverlay>
|
|
);
|
|
}
|
|
|
|
const StyledFilterOverlay = styled(FilterOverlay)`
|
|
.asset--query {
|
|
width: 20em;
|
|
}
|
|
`;
|
|
|
|
export default React.memo(Query);
|