nas/app/javascript/mastodon/features/antenna_adder/components/account.jsx
S.H 696e4a10d6
独自機能の追加などで他の部分への影響が分かるようにCI周りの修正 (#1)
* Fix EmojiFormatter failure

* Add notification_emails.warning setting default value

* Fix list spec failure and add antennas for spec response

* Fix domain block spec failure to add kb custom response

* Fix SearchQueryTransformer spec failure

* Fix Account#matches_display_name spec failure

* Fix UpdateStatusService changes mentions spec failure

* Fix RuboCop Lint

* Ignore brakeman warning

* Fix CI failure for ignore brakeman warning

* Fix migration failure

* Fix README

* Fix migration CI failure

* Fix some spec failure

* Format code for RuboCop lint failure

* Fix ESlint failure

* Fix haml-lint failure
2023-08-07 21:38:15 +09:00

43 lines
1.1 KiB
JavaScript

import { injectIntl } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
import { Avatar } from '../../../components/avatar';
import { DisplayName } from '../../../components/display_name';
import { makeGetAccount } from '../../../selectors';
const makeMapStateToProps = () => {
const getAccount = makeGetAccount();
const mapStateToProps = (state, { accountId }) => ({
account: getAccount(state, accountId),
});
return mapStateToProps;
};
class Account extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
};
render () {
const { account } = this.props;
return (
<div className='account'>
<div className='account__wrapper'>
<div className='account__display-name'>
<div className='account__avatar-wrapper'><Avatar account={account} size={36} /></div>
<DisplayName account={account} />
</div>
</div>
</div>
);
}
}
export default connect(makeMapStateToProps)(injectIntl(Account));