Skip to content

Commit 44862cb

Browse files
authored
Merge pull request #161 from scientist-softserv/bring-back-sending-messages
bring back sending messages
2 parents 6acdad9 + 8dbf8d7 commit 44862cb

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/compounds/ActionsGroup/ActionsGroup.jsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import React, { useState } from 'react'
22
import PropTypes from 'prop-types'
33
import { ListGroup } from 'react-bootstrap'
44
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
5-
// import SendMessage from './actions/SendMessage'
5+
import SendMessage from './actions/SendMessage'
66
import ViewFiles from './actions/ViewFiles'
77
import { allowNull } from '../../resources/utilityFunctions'
88
import './actions-group.scss'
99

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 }) => {
1211
const [show, setShow] = useState(false)
1312
const [action, setAction] = useState(null)
1413

@@ -24,35 +23,35 @@ const ActionsGroup = ({ initialFiles }) => {
2423
return (
2524
<>
2625
<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+
>
3030
<FontAwesomeIcon icon='fa-envelope' />
3131
Send Message
32-
</ListGroup.Item> */}
32+
</ListGroup.Item>
3333
<ListGroup.Item
3434
action
35-
variant='primary'
3635
onClick={() => handleShow('ViewFiles')}
3736
role='presentation'
3837
>
3938
<FontAwesomeIcon icon='fa-file-lines' />
4039
View Files
4140
</ListGroup.Item>
4241
</ListGroup>
43-
{/* {(action === 'SendMessage' && show)
42+
{(action === 'SendMessage' && show)
4443
&& (
4544
<SendMessage
4645
handleClose={handleClose}
4746
onSubmit={handleSendingMessagesOrFiles}
4847
/>
49-
)} */}
48+
)}
5049
{(action === 'ViewFiles' && show)
5150
&& (
5251
<ViewFiles
5352
handleClose={handleClose}
5453
initialFiles={initialFiles}
55-
// onSubmit={handleSendingMessagesOrFiles}
54+
onSubmit={handleSendingMessagesOrFiles}
5655
/>
5756
)}
5857
</>

0 commit comments

Comments
 (0)