flow checks

This commit is contained in:
okbel
2018-04-16 16:07:00 -03:00
parent c2b14fca10
commit 42ca5743aa
2 changed files with 5 additions and 2 deletions
@@ -15,7 +15,7 @@ const ActionsMenuItem = props => (
ActionsMenuItem.propTypes = {
className: PropTypes.string,
children: PropTypes.string,
children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
};
export default ActionsMenuItem;
@@ -220,16 +220,19 @@ class UserDetail extends React.Component {
{usernameChanged && (
<ActionsMenuItem onClick={this.goToReportedUsernames}>
{t('user_detail.username_needs_approval')}
{` `}
<Icon name="launch" />
</ActionsMenuItem>
)}
{usernameRejected && !usernameChanged ? (
<ActionsMenuItem disabled={me.id === user.id}>
<ActionsMenuItem disabled>
{t('user_detail.username_rejected')}
</ActionsMenuItem>
) : (
<ActionsMenuItem
onClick={() => rejectUsername({ id: user.id })}
disabled={me.id === user.id}
>
{t('user_detail.reject_username')}
</ActionsMenuItem>