Skip to content

Commit 96bcbb6

Browse files
committed
migration
1 parent eb7682d commit 96bcbb6

File tree

4 files changed

+48
-75
lines changed

4 files changed

+48
-75
lines changed

front/src/pages/about/__tests__/About.test.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ import About from '../About';
55

66
describe('About page', () => {
77
it('renders as expected', () => {
8-
const props = {
9-
actions: {},
10-
};
118
const component = shallow(
129
<div>
1310
<MemoryRouter>
14-
<About {...props} />
11+
<About />
1512
</MemoryRouter>
1613
</div>,
1714
);

front/src/pages/home/Home.js

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

front/src/pages/home/Home.tsx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import React from 'react';
2+
import { RouteComponentProps } from 'react-router-dom';
3+
import Jumbotron from 'reactstrap/lib/Jumbotron';
4+
import { Link } from 'react-router-dom';
5+
import HomeInfo from './styled/HomeInfo';
6+
import MainTitle from './styled/MainTitle';
7+
import LightNote from './styled/LightNote';
8+
9+
type Props = {} & RouteComponentProps<any, any>;
10+
11+
function Home({}: Props) {
12+
return (
13+
<div>
14+
<Jumbotron>
15+
<HomeInfo>
16+
<MainTitle>ReactJS 16.4+ Bootstrap 4</MainTitle>
17+
<h2>
18+
with Hot Reload (<i>react-hot-loader 4+</i>
19+
)!!!
20+
</h2>
21+
<h2>and React 16+ Context API</h2>
22+
<h2>and React Router v4</h2>
23+
<h2>and webpack 4.x</h2>
24+
<h2>and Typescript</h2>
25+
<h2>
26+
and styled-components (
27+
<LightNote>
28+
so keep using SCSS like styles and benefit performant css-in-js
29+
</LightNote>
30+
)
31+
</h2>
32+
<h1>Starter</h1>
33+
<p>
34+
<Link className="btn btn-success btn-lg" to={'/about'}>
35+
<i className="fa fa-info" />
36+
&nbsp; go to about
37+
</Link>
38+
</p>
39+
</HomeInfo>
40+
</Jumbotron>
41+
</div>
42+
);
43+
}
44+
45+
Home.displayName = 'Home';
46+
47+
export default Home;
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
// @flow
2-
3-
// #region imports
41
import { compose } from 'redux';
52
import Home from './Home';
63
import withEnterAnimation from '../../hoc/withEnterAnimation';
7-
// #endregion
84

95
export default compose(withEnterAnimation(/* no option yet */))(Home);

0 commit comments

Comments
 (0)