diff --git a/src/EteSyncContext.tsx b/src/EteSyncContext.tsx index bbd9172..ac7ac86 100644 --- a/src/EteSyncContext.tsx +++ b/src/EteSyncContext.tsx @@ -10,19 +10,11 @@ import JournalList from './JournalList'; import JournalView from './JournalView'; import JournalFetcher from './JournalFetcher'; -import * as EteSync from './api/EteSync'; - import { routeResolver, getPalette } from './App'; import { store, StoreState, FetchStatus, CredentialsType, CredentialsData, fetchCredentials } from './store'; import * as C from './Constants'; -export interface EteSyncContextType { - serviceApiUrl: string; - credentials: EteSync.Credentials; - encryptionKey: string; -} - interface FormErrors { errorEmail?: string; errorPassword?: string; diff --git a/src/JournalFetcher.tsx b/src/JournalFetcher.tsx index 87a3ccb..37a9a5f 100644 --- a/src/JournalFetcher.tsx +++ b/src/JournalFetcher.tsx @@ -2,12 +2,10 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { withRouter } from 'react-router'; -import { EteSyncContextType } from './EteSyncContext'; - -import { store, JournalsType, fetchJournals, StoreState } from './store'; +import { store, JournalsType, fetchJournals, StoreState, CredentialsData } from './store'; interface PropsType { - etesync: EteSyncContextType; + etesync: CredentialsData; children: any; } diff --git a/src/JournalList.tsx b/src/JournalList.tsx index 5731c48..4b9c4ab 100644 --- a/src/JournalList.tsx +++ b/src/JournalList.tsx @@ -6,18 +6,17 @@ import { Link } from 'react-router-dom'; import { List, ListItem } from 'material-ui/List'; import Paper from 'material-ui/Paper'; -import { EteSyncContextType } from './EteSyncContext'; import * as EteSync from './api/EteSync'; import { routeResolver } from './App'; -import * as store from './store'; +import { JournalsType, StoreState, CredentialsData } from './store'; interface PropsType { - etesync: EteSyncContextType; + etesync: CredentialsData; } interface PropsTypeInner extends PropsType { - journals: store.JournalsType; + journals: JournalsType; } class JournalList extends React.Component { @@ -85,7 +84,7 @@ class JournalList extends React.Component { } } -const mapStateToProps = (state: store.StoreState, props: PropsType) => { +const mapStateToProps = (state: StoreState, props: PropsType) => { return { journals: state.cache.journals, }; diff --git a/src/JournalView.tsx b/src/JournalView.tsx index 9226c78..a5f2d30 100644 --- a/src/JournalView.tsx +++ b/src/JournalView.tsx @@ -4,17 +4,16 @@ import { connect } from 'react-redux'; import { withRouter } from 'react-router'; import { Tabs, Tab } from 'material-ui/Tabs'; -import { EteSyncContextType } from './EteSyncContext'; import * as EteSync from './api/EteSync'; import JournalViewEntries from './JournalViewEntries'; import JournalViewAddressBook from './JournalViewAddressBook'; import JournalViewCalendar from './JournalViewCalendar'; -import { store, StoreState, JournalsType, EntriesType, fetchEntries } from './store'; +import { store, StoreState, JournalsType, EntriesType, CredentialsData, fetchEntries } from './store'; interface PropsType { - etesync: EteSyncContextType; + etesync: CredentialsData; match: any; }