@@ -3,9 +3,11 @@ import PropTypes from 'prop-types'
3
3
import { ListGroup } from 'react-bootstrap'
4
4
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
5
5
import SendMessage from './actions/SendMessage'
6
+ import ViewFiles from './actions/ViewFiles'
6
7
import './actions-group.scss'
7
8
8
- const ActionsGroup = ( { handleSendingMessages } ) => {
9
+ const ActionsGroup = ( { files, handleSendingMessages } ) => {
10
+ console . log ( files )
9
11
const [ show , setShow ] = useState ( false )
10
12
const [ action , setAction ] = useState ( null )
11
13
@@ -22,24 +24,42 @@ const ActionsGroup = ({ handleSendingMessages }) => {
22
24
return (
23
25
< >
24
26
< ListGroup className = 'actions-group' >
25
- < ListGroup . Item action variant = 'primary' onClick = { ( ) => handleShow ( 'SendMessage' ) } >
27
+ { /* TODO(@summercook): return the below once the direction of
28
+ https://github.com/scientist-softserv/webstore/issues/156 has been decided */ }
29
+ { /* <ListGroup.Item action variant='primary' onClick={() => handleShow('SendMessage')}>
26
30
<FontAwesomeIcon icon='fa-envelope' />
27
31
Send Message
32
+ </ListGroup.Item> */ }
33
+ < ListGroup . Item action variant = 'primary' onClick = { ( ) => handleShow ( 'ViewFiles' ) } role = 'presentation' >
34
+ < FontAwesomeIcon icon = 'fa-file-lines' />
35
+ View Files
28
36
</ ListGroup . Item >
29
37
</ ListGroup >
30
- { ( action === 'SendMessage' && show )
38
+ { /* TODO(@summercook): return the below once the direction of
39
+ https://github.com/scientist-softserv/webstore/issues/156 has been decided */ }
40
+ { /* {(action === 'SendMessage' && show)
31
41
&& (
32
42
<SendMessage
33
43
handleClose={handleClose}
34
44
onSubmit={handleSendingMessages}
35
45
/>
46
+ )} */ }
47
+ { ( action === 'ViewFiles' && show )
48
+ && (
49
+ < ViewFiles
50
+ show = { show }
51
+ handleClose = { handleClose }
52
+ files = { files }
53
+ />
36
54
) }
37
55
</ >
38
56
)
39
57
}
40
58
41
- ActionsGroup . propTypes = {
42
- handleSendingMessages : PropTypes . func . isRequired ,
43
- }
59
+ // ActionsGroup.propTypes = {
60
+ // TODO(@summercook): return the below once the direction of
61
+ // https://github.com/scientist-softserv/webstore/issues/156 has been decided
62
+ //handleSendingMessages: PropTypes.func.isRequired,
63
+ // }
44
64
45
65
export default ActionsGroup
0 commit comments