]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/components/domain.js
1 import React
from 'react';
2 import PropTypes
from 'prop-types';
3 import IconButton
from './icon_button';
4 import { defineMessages
, injectIntl
} from 'react-intl';
5 import ImmutablePureComponent
from 'react-immutable-pure-component';
7 const messages
= defineMessages({
8 unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unblock domain {domain}' },
11 export default @injectIntl
12 class Account
extends ImmutablePureComponent
{
15 domain: PropTypes
.string
,
16 onUnblockDomain: PropTypes
.func
.isRequired
,
17 intl: PropTypes
.object
.isRequired
,
20 handleDomainUnblock
= () => {
21 this.props
.onUnblockDomain(this.props
.domain
);
25 const { domain
, intl
} = this.props
;
28 <div className
='domain'>
29 <div className
='domain__wrapper'>
30 <span className
='domain__domain-name'>
31 <strong
>{domain
}</strong
>
34 <div className
='domain__buttons'>
35 <IconButton active icon
='unlock' title
={intl
.formatMessage(messages
.unblockDomain
, { domain
})} onClick
={this.handleDomainUnblock
} />
This page took 0.084323 seconds and 5 git commands to generate.