@@ -4,7 +4,6 @@ import moment from 'moment';
4
4
import { Droppable } from 'react-beautiful-dnd' ;
5
5
import { intersection } from 'lodash' ;
6
6
7
- import useCurrentUser from 'shared/hooks/currentUser' ;
8
7
import { IssueStatusCopy } from 'shared/constants/issues' ;
9
8
10
9
import Issue from './Issue' ;
@@ -14,11 +13,14 @@ const propTypes = {
14
13
status : PropTypes . string . isRequired ,
15
14
project : PropTypes . object . isRequired ,
16
15
filters : PropTypes . object . isRequired ,
16
+ currentUserId : PropTypes . number ,
17
17
} ;
18
18
19
- const ProjectBoardList = ( { status, project, filters } ) => {
20
- const { currentUserId } = useCurrentUser ( ) ;
19
+ const defaultProps = {
20
+ currentUserId : null ,
21
+ } ;
21
22
23
+ const ProjectBoardList = ( { status, project, filters, currentUserId } ) => {
22
24
const filteredIssues = filterIssues ( project . issues , filters , currentUserId ) ;
23
25
const filteredListIssues = getSortedListIssues ( filteredIssues , status ) ;
24
26
const allListIssues = getSortedListIssues ( project . issues , status ) ;
@@ -77,5 +79,6 @@ const formatIssuesCount = (allListIssues, filteredListIssues) => {
77
79
} ;
78
80
79
81
ProjectBoardList . propTypes = propTypes ;
82
+ ProjectBoardList . defaultProps = defaultProps ;
80
83
81
84
export default ProjectBoardList ;
0 commit comments