Skip to content

Commit 56937e4

Browse files
committed
migration
1 parent cfd5b03 commit 56937e4

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

front/src/hoc/withSuspense/styled/AnimatedDiv.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,19 @@ const fadeIn = keyframes`
1010
}
1111
`;
1212

13+
const mixin = css`
14+
opacity: 0;
15+
animation-name: ${fadeIn};
16+
animation-timing-function: ease-in;
17+
animation-duration: 0.7s;
18+
animation-delay: 0s;
19+
animation-fill-mode: both;
20+
`
21+
1322
const AnimatedDiv = styled.div`
1423
${({ viewEnter }) =>
15-
viewEnter &&
16-
css`
17-
opacity: 0;
18-
animation-name: ${fadeIn};
19-
animation-timing-function: ease-in;
20-
animation-duration: 0.7s;
21-
animation-delay: 0s;
22-
animation-fill-mode: both;
23-
`};
24+
viewEnter &&mixin
25+
}
2426
`;
2527

2628
export default AnimatedDiv;

front/src/pages/about/About.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React from 'react';
22
import { RouteComponentProps } from 'react-router-dom';
3+
import FadeInEntrance from '../../components/fadeInEntrance';
34

45
type Props = {} & RouteComponentProps<any, any>;
56

67
function About({}: Props) {
78
return (
8-
<div>
9+
<FadeInEntrance>
910
<h1>About</h1>
10-
</div>
11+
</FadeInEntrance>
1112
);
1213
}
1314

front/src/pages/about/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { compose } from 'redux';
22
import About from './About';
3-
import withEnterAnimation from '../../hoc/withEnterAnimation';
43

5-
export default compose(withEnterAnimation(/* no option yet */))(About);
4+
export default compose()(About);

front/src/pages/home/Home.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import { Link } from 'react-router-dom';
55
import HomeInfo from './styled/HomeInfo';
66
import MainTitle from './styled/MainTitle';
77
import LightNote from './styled/LightNote';
8+
import FadeInEntrance from '../../components/fadeInEntrance';
89

910
type Props = {} & RouteComponentProps<any, any>;
1011

1112
function Home({}: Props) {
1213
return (
13-
<div>
14+
<FadeInEntrance>
1415
<Jumbotron>
1516
<HomeInfo>
1617
<MainTitle>ReactJS 16.4+ Bootstrap 4</MainTitle>
@@ -38,7 +39,7 @@ function Home({}: Props) {
3839
</p>
3940
</HomeInfo>
4041
</Jumbotron>
41-
</div>
42+
</FadeInEntrance>
4243
);
4344
}
4445

front/src/pages/home/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { compose } from 'redux';
22
import Home from './Home';
3-
import withEnterAnimation from '../../hoc/withEnterAnimation';
43

5-
export default compose(withEnterAnimation(/* no option yet */))(Home);
4+
export default compose()(Home);

0 commit comments

Comments
 (0)