Skip to content

Commit 312db7c

Browse files
authored
[config] Update dependencies (#2)
* [config] Update dependencies * [fix] Test
1 parent 7157d6a commit 312db7c

File tree

5 files changed

+2069
-1030
lines changed

5 files changed

+2069
-1030
lines changed

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"history": "^4.6.1",
6+
"history": "^4.6.3",
77
"immutable": "^3.8.1",
88
"prop-types": "^15.5.10",
9-
"react": "^15.5.4",
10-
"react-dom": "^15.5.4",
11-
"react-redux": "^5.0.4",
9+
"react": "^15.6.1",
10+
"react-dom": "^15.6.1",
11+
"react-redux": "^5.0.5",
1212
"react-router-dom": "^4.1.1",
1313
"react-router-redux": "^5.0.0-alpha.6",
14-
"redux": "^3.6.0",
15-
"redux-saga": "^0.15.3"
14+
"redux": "^3.7.1",
15+
"redux-saga": "^0.15.4"
1616
},
1717
"devDependencies": {
18-
"eslint": "^3.19.0",
19-
"eslint-config-airbnb": "^14.1.0",
20-
"eslint-plugin-import": "^2.2.0",
21-
"eslint-plugin-jsx-a11y": "4.0.0",
22-
"eslint-plugin-react": "^7.0.0",
23-
"lint-staged": "^3.4.1",
18+
"eslint": "3.19.0",
19+
"eslint-config-airbnb": "15.0.2",
20+
"eslint-plugin-import": "2.6.1",
21+
"eslint-plugin-jsx-a11y": "5.1.1",
22+
"eslint-plugin-react": "7.1.0",
23+
"lint-staged": "^4.0.0",
2424
"pre-commit": "^1.2.2",
25-
"react-scripts": "0.9.5"
25+
"react-scripts": "1.0.10"
2626
},
2727
"scripts": {
2828
"start": "react-scripts start",

src/containers/App/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import { selectApiData } from './selectors';
88

99
import logo from './images/logo.svg';
1010

11+
const getMyIp = (apiData) => (
12+
(apiData && apiData.origin) && apiData.origin.split(', ')[1]
13+
);
14+
1115
class App extends Component {
1216
componentWillMount() {
1317
this.props.actions.getAPIData();
@@ -24,7 +28,7 @@ class App extends Component {
2428
To get started, edit <code>src/App.js</code> and save to reload.
2529
</p>
2630
<p className="app-intro">
27-
Your IP is: {this.props.apiData && this.props.apiData.origin.split(', ')[1]}
31+
Your IP is: {getMyIp(this.props.apiData)}
2832
</p>
2933
</div>
3034
);

src/containers/App/tests/index.test.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/tests/index.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import { Provider } from 'react-redux';
4+
5+
import store from './../store';
6+
import routes from './../routes';
7+
8+
it('renders without crashing', () => {
9+
const div = document.createElement('div');
10+
ReactDOM.render(<Provider store={store}>{routes}</Provider>, div);
11+
});

0 commit comments

Comments
 (0)