pleroma/app/soapbox/features/crypto-donate/components/site-wallet.tsx
marcin mikołajczak 81de0014d3 Change ESLint rules, lint
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-02-16 00:12:02 +01:00

30 lines
726 B
TypeScript

import React from 'react';
import { Stack } from 'soapbox/components/ui';
import { useSoapboxConfig } from 'soapbox/hooks';
import CryptoAddress from './crypto-address';
interface ISiteWallet {
limit?: number
}
const SiteWallet: React.FC<ISiteWallet> = ({ limit }): JSX.Element => {
const { cryptoAddresses } = useSoapboxConfig();
const addresses = typeof limit === 'number' ? cryptoAddresses.take(limit) : cryptoAddresses;
return (
<Stack space={4}>
{addresses.map(address => (
<CryptoAddress
key={address.ticker}
address={address.address}
ticker={address.ticker}
note={address.note}
/>
))}
</Stack>
);
};
export default SiteWallet;