1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-24 20:32:02 +02:00
metamask-extension/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.component.js
Erik Marks 76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00

35 lines
867 B
JavaScript

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ContactList from '../../../../components/app/contact-list';
import { CONTACT_MY_ACCOUNTS_VIEW_ROUTE } from '../../../../helpers/constants/routes';
export default class ViewContact extends PureComponent {
static contextTypes = {
t: PropTypes.func,
};
static propTypes = {
myAccounts: PropTypes.array,
history: PropTypes.object,
};
renderMyAccounts() {
const { myAccounts, history } = this.props;
return (
<div>
<ContactList
searchForMyAccounts={() => myAccounts}
selectRecipient={(address) => {
history.push(`${CONTACT_MY_ACCOUNTS_VIEW_ROUTE}/${address}`);
}}
/>
</div>
);
}
render() {
return <div className="address-book">{this.renderMyAccounts()}</div>;
}
}