|
@@ -1,17 +1,25 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
3
|
|
-import React from 'react';
|
|
3
|
+import React, { useCallback } from 'react';
|
4
|
4
|
import { useTranslation } from 'react-i18next';
|
5
|
5
|
import { Text, View } from 'react-native';
|
6
|
6
|
import { Button } from 'react-native-paper';
|
|
7
|
+import { useDispatch } from 'react-redux';
|
7
|
8
|
|
|
9
|
+import { createToolbarEvent, sendAnalytics } from '../../../analytics';
|
8
|
10
|
import { Icon, IconInviteMore } from '../../../base/icons';
|
|
11
|
+import { doInvitePeople } from '../../../invite/actions.native';
|
9
|
12
|
|
10
|
13
|
import { MeetingParticipantItem } from './MeetingParticipantItem';
|
11
|
14
|
import { participants } from './participants';
|
12
|
15
|
import styles from './styles';
|
13
|
16
|
|
14
|
17
|
export const MeetingParticipantList = () => {
|
|
18
|
+ const dispatch = useDispatch();
|
|
19
|
+ const onInvite = useCallback(() => {
|
|
20
|
+ sendAnalytics(createToolbarEvent('invite'));
|
|
21
|
+ dispatch(doInvitePeople());
|
|
22
|
+ }, [ dispatch ]);
|
15
|
23
|
const { t } = useTranslation();
|
16
|
24
|
|
17
|
25
|
return (
|
|
@@ -30,6 +38,7 @@ export const MeetingParticipantList = () => {
|
30
|
38
|
}
|
31
|
39
|
labelStyle = { styles.inviteLabel }
|
32
|
40
|
mode = 'contained'
|
|
41
|
+ onPress = { onInvite }
|
33
|
42
|
style = { styles.inviteButton } />
|
34
|
43
|
{ participants.map(p => (
|
35
|
44
|
<MeetingParticipantItem
|