Remove the redundant EteSyncContextType interface.

master
Tom Hacohen 7 years ago
parent c67ba9a233
commit 49b9469284

@ -10,19 +10,11 @@ import JournalList from './JournalList';
import JournalView from './JournalView'; import JournalView from './JournalView';
import JournalFetcher from './JournalFetcher'; import JournalFetcher from './JournalFetcher';
import * as EteSync from './api/EteSync';
import { routeResolver, getPalette } from './App'; import { routeResolver, getPalette } from './App';
import { store, StoreState, FetchStatus, CredentialsType, CredentialsData, fetchCredentials } from './store'; import { store, StoreState, FetchStatus, CredentialsType, CredentialsData, fetchCredentials } from './store';
import * as C from './Constants'; import * as C from './Constants';
export interface EteSyncContextType {
serviceApiUrl: string;
credentials: EteSync.Credentials;
encryptionKey: string;
}
interface FormErrors { interface FormErrors {
errorEmail?: string; errorEmail?: string;
errorPassword?: string; errorPassword?: string;

@ -2,12 +2,10 @@ import * as React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { withRouter } from 'react-router'; import { withRouter } from 'react-router';
import { EteSyncContextType } from './EteSyncContext'; import { store, JournalsType, fetchJournals, StoreState, CredentialsData } from './store';
import { store, JournalsType, fetchJournals, StoreState } from './store';
interface PropsType { interface PropsType {
etesync: EteSyncContextType; etesync: CredentialsData;
children: any; children: any;
} }

@ -6,18 +6,17 @@ import { Link } from 'react-router-dom';
import { List, ListItem } from 'material-ui/List'; import { List, ListItem } from 'material-ui/List';
import Paper from 'material-ui/Paper'; import Paper from 'material-ui/Paper';
import { EteSyncContextType } from './EteSyncContext';
import * as EteSync from './api/EteSync'; import * as EteSync from './api/EteSync';
import { routeResolver } from './App'; import { routeResolver } from './App';
import * as store from './store'; import { JournalsType, StoreState, CredentialsData } from './store';
interface PropsType { interface PropsType {
etesync: EteSyncContextType; etesync: CredentialsData;
} }
interface PropsTypeInner extends PropsType { interface PropsTypeInner extends PropsType {
journals: store.JournalsType; journals: JournalsType;
} }
class JournalList extends React.Component { 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 { return {
journals: state.cache.journals, journals: state.cache.journals,
}; };

@ -4,17 +4,16 @@ import { connect } from 'react-redux';
import { withRouter } from 'react-router'; import { withRouter } from 'react-router';
import { Tabs, Tab } from 'material-ui/Tabs'; import { Tabs, Tab } from 'material-ui/Tabs';
import { EteSyncContextType } from './EteSyncContext';
import * as EteSync from './api/EteSync'; import * as EteSync from './api/EteSync';
import JournalViewEntries from './JournalViewEntries'; import JournalViewEntries from './JournalViewEntries';
import JournalViewAddressBook from './JournalViewAddressBook'; import JournalViewAddressBook from './JournalViewAddressBook';
import JournalViewCalendar from './JournalViewCalendar'; import JournalViewCalendar from './JournalViewCalendar';
import { store, StoreState, JournalsType, EntriesType, fetchEntries } from './store'; import { store, StoreState, JournalsType, EntriesType, CredentialsData, fetchEntries } from './store';
interface PropsType { interface PropsType {
etesync: EteSyncContextType; etesync: CredentialsData;
match: any; match: any;
} }

Loading…
Cancel
Save