add invite friends ui
This commit is contained in:
@@ -64,6 +64,7 @@ import * as Toast from '#/components/Toast'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {useAnalytics} from '#/analytics'
|
||||
import {IS_INTERNAL, IS_IOS, IS_NATIVE} from '#/env'
|
||||
import {InviteFriendsDialog} from '#/features/inviteFriends'
|
||||
import {useActorStatus} from '#/features/liveNow'
|
||||
import {device, useStorage} from '#/storage'
|
||||
import {useActivitySubscriptionsNudged} from '#/storage/hooks/activity-subscriptions-nudged'
|
||||
@@ -76,6 +77,7 @@ export function SettingsScreen({}: Props) {
|
||||
const {logoutEveryAccount} = useSessionApi()
|
||||
const {accounts, currentAccount} = useSession()
|
||||
const switchAccountControl = useDialogControl()
|
||||
const inviteFriendsControl = useDialogControl()
|
||||
const signOutPromptControl = Prompt.usePromptControl()
|
||||
const {data: profile} = useProfileQuery({did: currentAccount?.did})
|
||||
const {data: otherProfiles} = useProfilesQuery({
|
||||
@@ -208,6 +210,18 @@ export function SettingsScreen({}: Props) {
|
||||
<Trans>Content and media</Trans>
|
||||
</SettingsList.ItemText>
|
||||
</SettingsList.LinkItem>
|
||||
{IS_NATIVE && (
|
||||
<SettingsList.PressableItem
|
||||
label={l`Find and invite friends`}
|
||||
accessibilityHint={l`Opens the invite friends sheet to share your profile`}
|
||||
onPress={() => inviteFriendsControl.open()}>
|
||||
<SettingsList.ItemIcon icon={ContactsIcon} />
|
||||
<SettingsList.ItemText>
|
||||
<Trans>Find and invite friends</Trans>
|
||||
</SettingsList.ItemText>
|
||||
<SettingsList.Chevron />
|
||||
</SettingsList.PressableItem>
|
||||
)}
|
||||
{IS_NATIVE &&
|
||||
findContactsEnabled &&
|
||||
!ax.features.enabled(ax.features.ImportContactsSettingsDisable) && (
|
||||
@@ -302,6 +316,7 @@ export function SettingsScreen({}: Props) {
|
||||
/>
|
||||
|
||||
<SwitchAccountDialog control={switchAccountControl} />
|
||||
<InviteFriendsDialog control={inviteFriendsControl} />
|
||||
</Layout.Screen>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user