File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
webapp/javascript/components Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
- import { connect } from "react-redux" ;
2
+ import { useDispatch } from "react-redux" ;
3
3
4
4
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
5
5
import { faSyncAlt } from "@fortawesome/free-solid-svg-icons" ;
6
6
import { refresh } from "../redux/actions" ;
7
7
8
8
function RefreshButton ( ) {
9
+ const dispatch = useDispatch ( ) ;
9
10
return (
10
11
< div >
11
- < button className = "btn refresh-btn" onClick = { ( ) => refresh ( ) } >
12
+ < button className = "btn refresh-btn" onClick = { ( ) => dispatch ( refresh ( ) ) } >
12
13
< FontAwesomeIcon icon = { faSyncAlt } />
13
14
</ button >
14
15
</ div >
15
16
) ;
16
17
}
17
18
18
- export default connect ( ( x ) => x , { refresh } ) ( RefreshButton ) ;
19
+ export default RefreshButton ;
You can’t perform that action at this time.
0 commit comments