migrate to expo-clipboard (#3419)

* replace package

* replace usages
This commit is contained in:
Hailey 2024-04-04 21:19:15 -07:00 committed by GitHub
parent 101d1589bf
commit 0433f8ad68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 69 additions and 68 deletions

View file

@ -1,6 +1,6 @@
import {Share} from 'react-native'
// import * as Sharing from 'expo-sharing'
import Clipboard from '@react-native-clipboard/clipboard'
import {setStringAsync} from 'expo-clipboard'
import {isAndroid, isIOS} from 'platform/detection'
import * as Toast from '#/view/com/util/Toast'
@ -19,7 +19,7 @@ export async function shareUrl(url: string) {
} else {
// React Native Share is not supported by web. Web Share API
// has increasing but not full support, so default to clipboard
Clipboard.setString(url)
setStringAsync(url)
Toast.show('Copied to clipboard')
}
}