We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 879ef3b commit bff1bb8Copy full SHA for bff1bb8
source/views/components/call-phone.js
@@ -3,9 +3,14 @@
3
import {Alert, Clipboard} from 'react-native'
4
import {phonecall} from 'react-native-communications'
5
6
-export function callPhone(phoneNumber: string) {
+type Options = {|
7
+ prompt?: boolean,
8
+|}
9
+
10
+export function callPhone(phoneNumber: string, opts?: Options) {
11
+ const {prompt = true} = opts || {}
12
try {
- phonecall(phoneNumber, true)
13
+ phonecall(phoneNumber, prompt)
14
} catch (err) {
15
Alert.alert(
16
"Apologies, we couldn't call that number",
0 commit comments