Skip to content

Commit 2328126

Browse files
committed
fix lint
1 parent a35d69a commit 2328126

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

src/app/__tests__/TravelContainer.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ describe('testing the play-button', () => {
8181
wrapper = shallow(<TravelContainer snapshotsLength={2} />);
8282
expect(wrapper.find('.play-button').text()).toBe('Play');
8383
});
84-
});
84+
});

src/app/containers/StateContainer.jsx

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,55 @@
11
import React, { useState } from 'react';
22
import PropTypes from 'prop-types';
33
import {
4-
MemoryRouter as Router, Route, NavLink, Switch,
4+
MemoryRouter as Router,
5+
Route,
6+
NavLink,
7+
Switch,
58
} from 'react-router-dom';
69
import StateRoute from '../components/StateRoute';
710
import DiffRoute from '../components/DiffRoute';
811

9-
1012
// eslint-disable-next-line react/prop-types
1113
const StateContainer = ({ snapshot, hierarchy }) => {
12-
const [ Text, setText ] = useState('State');
14+
const [Text, setText] = useState('State');
1315
return (
1416
<Router>
1517
<div className="state-container">
1618
<div className="main-navbar-container">
17-
<div className="main-navbar-text">
18-
{Text}
19-
</div>
19+
<div className="main-navbar-text">{Text}</div>
2020
<div className="main-navbar">
21-
<NavLink className="main-router-link" activeClassName="is-active" exact to="/">
21+
<NavLink
22+
className="main-router-link"
23+
activeClassName="is-active"
24+
exact
25+
to="/"
26+
>
2227
State
2328
</NavLink>
24-
<NavLink className="main-router-link" activeClassName="is-active" to="/diff">
29+
<NavLink
30+
className="main-router-link"
31+
activeClassName="is-active"
32+
to="/diff"
33+
>
2534
Diff
2635
</NavLink>
2736
</div>
2837
</div>
2938
<Switch>
30-
<Route path="/diff" render={() => { setText('Diff'); return <DiffRoute snapshot={snapshot} />; }} />
31-
<Route path="/" render={() => { setText('State'); return <StateRoute snapshot={snapshot} hierarchy={hierarchy} />; }} />
39+
<Route
40+
path="/diff"
41+
render={() => {
42+
setText('Diff');
43+
return <DiffRoute snapshot={snapshot} />;
44+
}}
45+
/>
46+
<Route
47+
path="/"
48+
render={() => {
49+
setText('State');
50+
return <StateRoute snapshot={snapshot} hierarchy={hierarchy} />;
51+
}}
52+
/>
3253
</Switch>
3354
</div>
3455
</Router>

src/app/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@ import App from './components/App';
55
import './styles/main.scss';
66

77
ReactDOM.render(<App />, document.getElementById('root'));
8-
9-
10-
// chris test

0 commit comments

Comments
 (0)