|
|
@ -17,7 +17,7 @@ import SideMenuJournals from './SideMenuJournals';
|
|
|
|
|
|
|
|
|
|
|
|
import { routeResolver, getPalette } from './App';
|
|
|
|
import { routeResolver, getPalette } from './App';
|
|
|
|
|
|
|
|
|
|
|
|
import { store, logout, JournalsType, fetchJournals, StoreState, CredentialsData } from './store';
|
|
|
|
import { store, logout, JournalsType, StoreState, CredentialsData } from './store';
|
|
|
|
|
|
|
|
|
|
|
|
import * as C from './Constants';
|
|
|
|
import * as C from './Constants';
|
|
|
|
|
|
|
|
|
|
|
@ -43,22 +43,6 @@ class SideMenu extends React.Component {
|
|
|
|
this.props.onCloseDrawerRequest();
|
|
|
|
this.props.onCloseDrawerRequest();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fetchJournals() {
|
|
|
|
|
|
|
|
if (this.props.etesync !== null) {
|
|
|
|
|
|
|
|
store.dispatch(fetchJournals(this.props.etesync));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
|
|
this.fetchJournals();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentWillReceiveProps(nextProps: PropsTypeInner) {
|
|
|
|
|
|
|
|
if (this.props.etesync !== nextProps.etesync) {
|
|
|
|
|
|
|
|
this.fetchJournals();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const username = (this.props.etesync && this.props.etesync.credentials.email) ?
|
|
|
|
const username = (this.props.etesync && this.props.etesync.credentials.email) ?
|
|
|
|
this.props.etesync.credentials.email
|
|
|
|
this.props.etesync.credentials.email
|
|
|
|