2023-03-01 18:26:56 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import * as List from '../../../containers/List';
|
|
|
|
import { useVideoConf } from '../../../lib/hooks/useVideoConf';
|
|
|
|
|
|
|
|
export default function CallSection({ rid }: { rid: string }): React.ReactElement | null {
|
2023-08-21 19:12:34 +00:00
|
|
|
const { callEnabled, showInitCallActionSheet, disabledTooltip } = useVideoConf(rid);
|
|
|
|
if (callEnabled)
|
2023-03-01 18:26:56 +00:00
|
|
|
return (
|
|
|
|
<List.Section>
|
|
|
|
<List.Separator />
|
|
|
|
<List.Item
|
2023-04-11 14:54:01 +00:00
|
|
|
title={'Call'}
|
2023-03-01 18:26:56 +00:00
|
|
|
onPress={showInitCallActionSheet}
|
|
|
|
testID='room-actions-call'
|
|
|
|
left={() => <List.Icon name='phone' />}
|
|
|
|
showActionIndicator
|
2023-08-21 19:12:34 +00:00
|
|
|
disabled={disabledTooltip}
|
2023-03-01 18:26:56 +00:00
|
|
|
/>
|
|
|
|
<List.Separator />
|
|
|
|
</List.Section>
|
|
|
|
);
|
|
|
|
return null;
|
|
|
|
}
|