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