Skip to content

Commit 64412fd

Browse files
authored
Merge pull request #2 from matAlmeida/master
Upgrading Dependencies
2 parents a04a26f + 83727de commit 64412fd

File tree

8 files changed

+4444
-6726
lines changed

8 files changed

+4444
-6726
lines changed

.expo/packager-info.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"packagerPid": null,
55
"expoServerNgrokUrl": null,
66
"packagerNgrokUrl": null,
7-
"ngrokPid": null
7+
"ngrokPid": null,
8+
"devToolsPort": 19002
89
}

.expo/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"hostType": "tunnel",
2+
"hostType": "lan",
33
"lanType": "ip",
44
"dev": true,
55
"strict": false,

App.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import Expo from "expo";
2+
import * as Expo from "expo";
33
import { Provider } from "react-redux";
44
import { PersistGate } from "redux-persist/es/integration/react";
55
import { StyleProvider } from "native-base";
@@ -41,7 +41,8 @@ export default class App extends React.Component {
4141
}
4242

4343
render() {
44-
if (!this.state.isReady) {
44+
const { isReady } = this.state;
45+
if (!isReady) {
4546
return <Expo.AppLoading />;
4647
}
4748

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"expo": {
3-
"sdkVersion": "25.0.0",
3+
"sdkVersion": "31.0.0",
44
"name": "React Native Expo Starter",
55
"slug": "React-Native-Expo-Starter",
66
"icon": "src/assets/images/app-icon.png",

package-lock.json

Lines changed: 4384 additions & 6680 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,41 @@
33
"homepage": "https://miguelmeza.me",
44
"version": "1.0.0",
55
"devDependencies": {
6-
"eslint": "^4.18.2",
7-
"eslint-config-airbnb": "^16.1.0",
8-
"eslint-config-prettier": "^2.9.0",
6+
"eslint": "^5.10.0",
7+
"eslint-config-airbnb": "^17.1.0",
8+
"eslint-config-prettier": "^3.3.0",
99
"eslint-import-resolver-babel-module": "^4.0.0",
10-
"eslint-plugin-flowtype": "^2.46.1",
11-
"eslint-plugin-import": "^2.9.0",
12-
"eslint-plugin-jsx-a11y": "^6.0.3",
13-
"eslint-plugin-react": "^7.7.0",
14-
"eslint-plugin-standard": "^3.0.1",
15-
"prettier": "^1.11.1",
16-
"prettier-eslint": "^8.8.1",
17-
"react-native-scripts": "^1.12.0",
18-
"redux-logger": "^3.0.6"
10+
"eslint-plugin-flowtype": "^3.2.0",
11+
"eslint-plugin-import": "^2.14.0",
12+
"eslint-plugin-jsx-a11y": "^6.1.2",
13+
"eslint-plugin-react": "^7.11.1",
14+
"eslint-plugin-standard": "^4.0.0",
15+
"prettier": "^1.15.3",
16+
"prettier-eslint": "^8.8.2",
17+
"redux-logger": "^3.0.6",
18+
"schedule": "^0.4.0"
1919
},
20-
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
20+
"main": "node_modules/expo/AppEntry.js",
2121
"scripts": {
22-
"start": "react-native-scripts start",
23-
"eject": "react-native-scripts eject",
24-
"android": "react-native-scripts android",
25-
"ios": "react-native-scripts ios"
22+
"start": "expo start",
23+
"eject": "expo eject",
24+
"android": "expo android",
25+
"ios": "expo ios"
2626
},
2727
"dependencies": {
28-
"@expo/vector-icons": "^6.3.1",
28+
"@expo/vector-icons": "^8.0.0",
2929
"axios": "^0.18.0",
3030
"babel": "^6.23.0",
31-
"babel-eslint": "^8.2.2",
32-
"babel-plugin-module-resolver": "^3.1.0",
33-
"expo": "^25.0.0",
34-
"native-base": "^2.3.9",
35-
"prop-types": "^15.6.1",
36-
"react": "^16.2.0",
37-
"react-native": "https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz",
38-
"react-redux": "^5.0.7",
39-
"redux": "^3.7.2",
40-
"redux-persist": "^5.9.1",
41-
"redux-thunk": "^2.2.0"
31+
"babel-eslint": "^10.0.1",
32+
"babel-plugin-module-resolver": "^3.1.1",
33+
"expo": "^31.0.6",
34+
"native-base": "^2.8.1",
35+
"prop-types": "^15.6.2",
36+
"react": "^16.6.3",
37+
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
38+
"react-redux": "^6.0.0",
39+
"redux": "^4.0.1",
40+
"redux-persist": "^5.10.0",
41+
"redux-thunk": "^2.3.0"
4242
}
4343
}

src/components/dashboard/Dashboard.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,21 @@ class Dashboard extends Component {
3838
};
3939

4040
render = () => {
41-
const { isAuthenticated, isLoading } = this.props;
41+
const { isAuthenticated, isLoading, Logout: DashboardLogout } = this.props;
4242

4343
if (!isAuthenticated) {
4444
return <LoginScreen />;
45-
} else if (isLoading) {
45+
}
46+
47+
if (isLoading) {
4648
return <Loading />;
4749
}
4850

4951
return (
5052
<Container>
5153
<Header style={{ borderBottomWidth: 0 }}>
5254
<Left>
53-
<Button transparent onPress={this.props.Logout}>
55+
<Button transparent onPress={DashboardLogout}>
5456
<Icon name="exit" />
5557
</Button>
5658
</Left>
@@ -81,4 +83,7 @@ const mapDispatchToProps = {
8183
Logout
8284
};
8385

84-
export default connect(mapStateToProps, mapDispatchToProps)(Dashboard);
86+
export default connect(
87+
mapStateToProps,
88+
mapDispatchToProps
89+
)(Dashboard);

src/components/login/Login.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,17 @@ class LoginScreen extends Component {
4242
};
4343

4444
handleSubmit = () => {
45-
this.props
46-
.FakeLogin(this.props.email, this.props.password)
47-
.catch(e => console.log(`Error: ${e}`));
45+
const { email, password, FakeLogin: LoginFakeLogin } = this.props;
46+
LoginFakeLogin(email, password).catch(e => console.log(`Error: ${e}`));
4847
};
4948

5049
render = () => {
51-
const { isLoading, errorMessage } = this.props;
50+
const {
51+
isLoading,
52+
errorMessage,
53+
email,
54+
ChangeInputLogin: LoginChangeInputLogin
55+
} = this.props;
5256

5357
if (isLoading) return <Loading />;
5458

@@ -70,16 +74,16 @@ class LoginScreen extends Component {
7074
<Input
7175
style={{ fontFamily: "Questrial" }}
7276
autoCapitalize="none"
73-
value={this.props.email}
77+
value={email}
7478
keyboardType="email-address"
75-
onChangeText={v => this.props.ChangeInputLogin("email", v)}
79+
onChangeText={v => LoginChangeInputLogin("email", v)}
7680
/>
7781
</Item>
7882
<Item floatingLabel style={{ marginRight: 15 }}>
7983
<Label style={Styles.defaultFont}>Password</Label>
8084
<Input
8185
secureTextEntry
82-
onChangeText={v => this.props.ChangeInputLogin("password", v)}
86+
onChangeText={v => LoginChangeInputLogin("password", v)}
8387
/>
8488
</Item>
8589

@@ -114,4 +118,7 @@ const mapDispatchToProps = {
114118
ChangeInputLogin
115119
};
116120

117-
export default connect(mapStateToProps, mapDispatchToProps)(LoginScreen);
121+
export default connect(
122+
mapStateToProps,
123+
mapDispatchToProps
124+
)(LoginScreen);

0 commit comments

Comments
 (0)