Skip to content

Commit

Permalink
Merge pull request #2 from AndrewGable/tgolen-space-fixes
Browse files Browse the repository at this point in the history
Fix spaces
  • Loading branch information
AndrewGable authored Aug 8, 2020
2 parents d5d0b6f + be87ec1 commit c6ba301
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 33 deletions.
12 changes: 6 additions & 6 deletions js/Expensify.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { init as StoreInit } from './store/Store.js';
import {init as StoreInit} from './store/Store.js';
import SignInPage from './page/SignInPage.js';
import HomePage from './page/HomePage/HomePage.js';
import * as Store from './store/Store.js';
import * as ActiveClientManager from './lib/ActiveClientManager.js';
import { verifyAuthToken } from './store/actions/SessionActions.js';
import {verifyAuthToken} from './store/actions/SessionActions.js';
import STOREKEYS from './store/STOREKEYS.js';
import React, { Component } from 'react';
import { Route, Router, Redirect, Switch } from './lib/Router';
import React, {Component} from 'react';
import {Route, Router, Redirect, Switch} from './lib/Router';

// Initialize the store when the app loads for the first time
StoreInit();
Expand All @@ -25,7 +25,7 @@ export default class Expensify extends Component {
async componentDidMount() {
// Listen for when the app wants to redirect to a specific URL
Store.subscribe(STOREKEYS.APP_REDIRECT_TO, (redirectTo) => {
this.setState({ redirectTo });
this.setState({redirectTo});
});

// Verify that our authToken is OK to use
Expand All @@ -45,7 +45,7 @@ export default class Expensify extends Component {
* @param {object} newSession
*/
sessionChanged(newSession) {
this.setState({ isAuthTokenValid: newSession && newSession.authToken });
this.setState({isAuthTokenValid: newSession && newSession.authToken});
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion js/lib/ActiveClientManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ function isClientTheLeader() {
return activeClientIDs[0] === clientID;
}

export { init, removeClient, isClientTheLeader };
export {init, removeClient, isClientTheLeader};
2 changes: 1 addition & 1 deletion js/lib/Network.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ function processWriteQueue() {
// Process our write queue very often
// setInterval(processWriteQueue, 1000);

export { request, delayedWrite };
export {request, delayedWrite};
2 changes: 1 addition & 1 deletion js/lib/PersistentStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ const clear = async () => {
await AsyncStorage.clear();
};

export { get, set, clear };
export {get, set, clear};
4 changes: 2 additions & 2 deletions js/lib/Router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import {
withRouter,
} from 'react-router-dom';

export default { Link, Route, Redirect, Router, Switch, withRouter };
export { Link, Route, Redirect, Router, Switch, withRouter };
export default {Link, Route, Redirect, Router, Switch, withRouter};
export {Link, Route, Redirect, Router, Switch, withRouter};
4 changes: 2 additions & 2 deletions js/lib/Router/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import {
withRouter,
} from 'react-router-native';

export default { Link, Route, Redirect, Router, Switch, withRouter };
export { Link, Route, Redirect, Router, Switch, withRouter };
export default {Link, Route, Redirect, Router, Switch, withRouter};
export {Link, Route, Redirect, Router, Switch, withRouter};
6 changes: 3 additions & 3 deletions js/page/HomePage/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* @flow strict-local
*/

import React, { Component } from 'react';
import { SafeAreaView, Text, StatusBar, View, Button } from 'react-native';
import { signOut } from '../../store/actions/SessionActions';
import React, {Component} from 'react';
import {SafeAreaView, Text, StatusBar, View, Button} from 'react-native';
import {signOut} from '../../store/actions/SessionActions';

export default class App extends Component {
constructor(props) {
Expand Down
14 changes: 7 additions & 7 deletions js/page/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @flow strict-local
*/

import React, { Component } from 'react';
import React, {Component} from 'react';
import {
SafeAreaView,
Text,
Expand All @@ -13,7 +13,7 @@ import {
View,
} from 'react-native';
import * as Store from '../store/Store.js';
import { signIn } from '../store/actions/SessionActions.js';
import {signIn} from '../store/actions/SessionActions.js';
import STOREKEYS from '../store/STOREKEYS.js';

export default class App extends Component {
Expand Down Expand Up @@ -45,7 +45,7 @@ export default class App extends Component {
* @param {object} newSession
*/
sessionChanged(newSession) {
this.setState({ error: newSession && newSession.error });
this.setState({error: newSession && newSession.error});
}

/**
Expand All @@ -63,18 +63,18 @@ export default class App extends Component {
<View>
<Text>Login:</Text>
<TextInput
style={{ height: 40, borderColor: 'black', borderWidth: 2 }}
style={{height: 40, borderColor: 'black', borderWidth: 2}}
value={this.state.login}
onChangeText={(text) => this.setState({ login: text })}
onChangeText={(text) => this.setState({login: text})}
/>
</View>
<View>
<Text>Password:</Text>
<TextInput
style={{ height: 40, borderColor: 'black', borderWidth: 2 }}
style={{height: 40, borderColor: 'black', borderWidth: 2}}
secureTextEntry={true}
value={this.state.password}
onChangeText={(text) => this.setState({ password: text })}
onChangeText={(text) => this.setState({password: text})}
/>
</View>
<View>
Expand Down
2 changes: 1 addition & 1 deletion js/store/Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ const get = async (key, extraPath, defaultValue) => {
return val;
};

export { subscribe, unsubscribe, set, get, init };
export {subscribe, unsubscribe, set, get, init};
4 changes: 2 additions & 2 deletions js/store/actions/ReportActions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* globals moment */
import * as Store from '../Store.js';
import { request, delayedWrite } from '../../lib/Network.js';
import {request, delayedWrite} from '../../lib/Network.js';
import STOREKEYS from '../STOREKEYS.js';
import ExpensiMark from '../../lib/ExpensiMark.js';
import Guid from '../../lib/Guid.js';
Expand Down Expand Up @@ -116,4 +116,4 @@ function addComment(reportID, commentText) {
});
}

export { fetchAll, fetch, fetchComments, addComment };
export {fetchAll, fetch, fetchComments, addComment};
12 changes: 6 additions & 6 deletions js/store/actions/SessionActions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Store from '../Store.js';
import { request } from '../../lib/Network.js';
import {request} from '../../lib/Network.js';
import ROUTES from '../../ROUTES.js';
import STOREKEYS from '../STOREKEYS.js';
import * as PersistentStorage from '../../lib/PersistentStorage.js';
Expand Down Expand Up @@ -28,7 +28,7 @@ const AUTH_TOKEN_EXPIRATION_TIME = 1000 * 60;
* @param {boolean} useExpensifyLogin
*/
function signIn(login, password, useExpensifyLogin = false) {
Store.set(STOREKEYS.CREDENTIALS, { login, password });
Store.set(STOREKEYS.CREDENTIALS, {login, password});
Store.set(STOREKEYS.SESSION, {});
return request('Authenticate', {
useExpensifyLogin: useExpensifyLogin,
Expand Down Expand Up @@ -67,7 +67,7 @@ function signIn(login, password, useExpensifyLogin = false) {
})
.catch((err) => {
console.warn(err);
Store.set(STOREKEYS.SESSION, { error: err });
Store.set(STOREKEYS.SESSION, {error: err});
});
}

Expand All @@ -85,7 +85,7 @@ function createLogin(authToken, login, password) {
partnerUserID: login,
partnerUserSecret: password,
}).catch((err) => {
Store.set(STOREKEYS.SESSION, { error: err });
Store.set(STOREKEYS.SESSION, {error: err});
});
}

Expand Down Expand Up @@ -113,7 +113,7 @@ async function verifyAuthToken() {
return;
}

request('Get', { returnValueList: 'account' }).then((data) => {
request('Get', {returnValueList: 'account'}).then((data) => {
if (data.jsonCode === 200) {
console.debug('We have valid auth token');
Store.set(STOREKEYS.SESSION, data);
Expand All @@ -125,4 +125,4 @@ async function verifyAuthToken() {
});
}

export { signIn, signOut, verifyAuthToken };
export {signIn, signOut, verifyAuthToken};
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppRegistry } from 'react-native';
import {AppRegistry} from 'react-native';
import App from '../js/App';

AppRegistry.registerComponent('App', () => App);
Expand Down

0 comments on commit c6ba301

Please sign in to comment.