@@ -2,13 +2,12 @@ import React, { useState } from 'react'
2
2
import PropTypes from 'prop-types'
3
3
import { ListGroup } from 'react-bootstrap'
4
4
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
5
- // import SendMessage from './actions/SendMessage'
5
+ import SendMessage from './actions/SendMessage'
6
6
import ViewFiles from './actions/ViewFiles'
7
7
import { allowNull } from '../../resources/utilityFunctions'
8
8
import './actions-group.scss'
9
9
10
- // TODO: add back handleSendingMessagesOrFiles into the props, removing for now to avoid console error. see below TODO.
11
- const ActionsGroup = ( { initialFiles } ) => {
10
+ const ActionsGroup = ( { handleSendingMessagesOrFiles, initialFiles } ) => {
12
11
const [ show , setShow ] = useState ( false )
13
12
const [ action , setAction ] = useState ( null )
14
13
@@ -24,35 +23,35 @@ const ActionsGroup = ({ initialFiles }) => {
24
23
return (
25
24
< >
26
25
< ListGroup className = 'actions-group' >
27
- { /* TODO(@summercook): return this and the below commented code
28
- once we are able to refactor posting messages & attachments */ }
29
- { /* <ListGroup.Item action variant='primary' onClick={() => handleShow('SendMessage')}>
26
+ < ListGroup . Item
27
+ action
28
+ onClick = { ( ) => handleShow ( 'SendMessage' ) }
29
+ >
30
30
< FontAwesomeIcon icon = 'fa-envelope' />
31
31
Send Message
32
- </ListGroup.Item> */ }
32
+ </ ListGroup . Item >
33
33
< ListGroup . Item
34
34
action
35
- variant = 'primary'
36
35
onClick = { ( ) => handleShow ( 'ViewFiles' ) }
37
36
role = 'presentation'
38
37
>
39
38
< FontAwesomeIcon icon = 'fa-file-lines' />
40
39
View Files
41
40
</ ListGroup . Item >
42
41
</ ListGroup >
43
- { /* { (action === 'SendMessage' && show)
42
+ { ( action === 'SendMessage' && show )
44
43
&& (
45
44
< SendMessage
46
45
handleClose = { handleClose }
47
46
onSubmit = { handleSendingMessagesOrFiles }
48
47
/>
49
- )} */ }
48
+ ) }
50
49
{ ( action === 'ViewFiles' && show )
51
50
&& (
52
51
< ViewFiles
53
52
handleClose = { handleClose }
54
53
initialFiles = { initialFiles }
55
- // onSubmit={handleSendingMessagesOrFiles}
54
+ onSubmit = { handleSendingMessagesOrFiles }
56
55
/>
57
56
) }
58
57
</ >
0 commit comments