From 0433f8ad68c6778d79d97b35f26ca03ffa9b0db9 Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Thu, 4 Apr 2024 21:19:15 -0700
Subject: migrate to `expo-clipboard` (#3419)

* replace package

* replace usages
---
 src/view/com/modals/InviteCodes.tsx | 39 +++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

(limited to 'src/view/com/modals/InviteCodes.tsx')

diff --git a/src/view/com/modals/InviteCodes.tsx b/src/view/com/modals/InviteCodes.tsx
index c0318df01..f8cebec3f 100644
--- a/src/view/com/modals/InviteCodes.tsx
+++ b/src/view/com/modals/InviteCodes.tsx
@@ -1,36 +1,37 @@
 import React from 'react'
 import {
+  ActivityIndicator,
   StyleSheet,
   TouchableOpacity,
   View,
-  ActivityIndicator,
 } from 'react-native'
+import {setStringAsync} from 'expo-clipboard'
 import {ComAtprotoServerDefs} from '@atproto/api'
 import {
   FontAwesomeIcon,
   FontAwesomeIconStyle,
 } from '@fortawesome/react-native-fontawesome'
-import Clipboard from '@react-native-clipboard/clipboard'
-import {Text} from '../util/text/Text'
-import {Button} from '../util/forms/Button'
-import * as Toast from '../util/Toast'
-import {ScrollView} from './util'
-import {usePalette} from 'lib/hooks/usePalette'
-import {isWeb} from 'platform/detection'
-import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
-import {Trans, msg} from '@lingui/macro'
-import {cleanError} from 'lib/strings/errors'
-import {useModalControls} from '#/state/modals'
-import {useInvitesState, useInvitesAPI} from '#/state/invites'
-import {UserInfoText} from '../util/UserInfoText'
+import {msg, Trans} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
+
 import {makeProfileLink} from '#/lib/routes/links'
-import {Link} from '../util/Link'
-import {ErrorMessage} from '../util/error/ErrorMessage'
+import {useInvitesAPI, useInvitesState} from '#/state/invites'
+import {useModalControls} from '#/state/modals'
 import {
-  useInviteCodesQuery,
   InviteCodesQueryResponse,
+  useInviteCodesQuery,
 } from '#/state/queries/invites'
-import {useLingui} from '@lingui/react'
+import {usePalette} from 'lib/hooks/usePalette'
+import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
+import {cleanError} from 'lib/strings/errors'
+import {isWeb} from 'platform/detection'
+import {ErrorMessage} from '../util/error/ErrorMessage'
+import {Button} from '../util/forms/Button'
+import {Link} from '../util/Link'
+import {Text} from '../util/text/Text'
+import * as Toast from '../util/Toast'
+import {UserInfoText} from '../util/UserInfoText'
+import {ScrollView} from './util'
 
 export const snapPoints = ['70%']
 
@@ -148,7 +149,7 @@ function InviteCode({
   const uses = invite.uses
 
   const onPress = React.useCallback(() => {
-    Clipboard.setString(invite.code)
+    setStringAsync(invite.code)
     Toast.show(_(msg`Copied to clipboard`))
     setInviteCopied(invite.code)
   }, [setInviteCopied, invite, _])
-- 
cgit 1.4.1

