Restore /crypto/donate page
This commit is contained in:
parent
c8c2f40e38
commit
13c4948ad2
3 changed files with 10 additions and 9 deletions
|
@ -18,15 +18,17 @@ const normalizeAddress = (address: Address): Address => {
|
|||
};
|
||||
|
||||
interface ISiteWallet {
|
||||
limit: number,
|
||||
limit?: number,
|
||||
}
|
||||
|
||||
const SiteWallet: React.FC<ISiteWallet> = ({ limit }): JSX.Element => {
|
||||
const addresses: ImmutableList<Address> = useSoapboxConfig().get('cryptoAddresses');
|
||||
const coinList = addresses.map(normalizeAddress).take(limit);
|
||||
const addresses: ImmutableList<Address> =
|
||||
useSoapboxConfig().get('cryptoAddresses').map(normalizeAddress);
|
||||
|
||||
const coinList = typeof limit === 'number' ? addresses.take(limit) : addresses;
|
||||
|
||||
return (
|
||||
<div className='site-wallet'>
|
||||
<div>
|
||||
{coinList.map(coin => (
|
||||
<CryptoAddress
|
||||
key={coin.get('ticker')}
|
||||
|
|
|
@ -4,10 +4,9 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
|
|||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { Column } from 'soapbox/components/ui';
|
||||
import Accordion from 'soapbox/features/ui/components/accordion';
|
||||
|
||||
import Column from '../ui/components/column';
|
||||
|
||||
import SiteWallet from './components/site_wallet';
|
||||
|
||||
const messages = defineMessages({
|
||||
|
@ -39,7 +38,7 @@ class CryptoDonate extends ImmutablePureComponent {
|
|||
const { explanationBoxExpanded } = this.state;
|
||||
|
||||
return (
|
||||
<Column icon='bitcoin' heading={intl.formatMessage(messages.heading)}>
|
||||
<Column label={intl.formatMessage(messages.heading)} withHeader>
|
||||
<div className='crypto-donate'>
|
||||
<div className='explanation-box'>
|
||||
<Accordion
|
||||
|
|
|
@ -102,7 +102,7 @@ import {
|
|||
// AwaitingApproval,
|
||||
// Reports,
|
||||
// ModerationLog,
|
||||
// CryptoDonate,
|
||||
CryptoDonate,
|
||||
// ScheduledStatuses,
|
||||
// UserIndex,
|
||||
// FederationRestrictions,
|
||||
|
@ -347,8 +347,8 @@ class SwitchingColumnsArea extends React.PureComponent {
|
|||
<WrappedRoute path='/developers' page={DefaultPage} component={Developers} content={children} />
|
||||
<WrappedRoute path='/error' page={EmptyPage} component={IntentionalError} content={children} />
|
||||
|
||||
{/*
|
||||
<WrappedRoute path='/donate/crypto' publicRoute page={DefaultPage} component={CryptoDonate} content={children} />
|
||||
{/*
|
||||
<WrappedRoute path='/federation_restrictions' publicRoute page={DefaultPage} component={FederationRestrictions} content={children} />
|
||||
*/}
|
||||
|
||||
|
|
Loading…
Reference in a new issue