import React from 'react'; import {Actions, IdentityStore} from 'nylas-exports'; import {OpenIdentityPageButton, RetinaImg} from 'nylas-component-kit'; import {shell} from 'electron'; class PreferencesIdentity extends React.Component { static displayName = 'PreferencesIdentity'; constructor() { super(); this.state = this.getStateFromStores(); } componentDidMount() { this.unsubscribe = IdentityStore.listen(() => { this.setState(this.getStateFromStores()); }); } componentWillUnmount() { this.unsubscribe(); } getStateFromStores() { return { identity: IdentityStore.identity() || {}, }; } render() { const {identity} = this.state; const {firstname, lastname, email} = identity; const logout = () => Actions.logoutNylasIdentity() const learnMore = () => shell.openExternal("https://nylas.com/nylas-pro") return (