From ea04c2bd330dc5b46d6f9df0d7d4619bbd8f56d0 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 5 Apr 2023 18:56:02 -0500 Subject: Add user invite codes (#393) * Add mobile UIs for invite codes * Update invite code UIs for web * Finish implementing invite code behaviors (including notifications of invited users) * Bump deps * Update web right nav to use real data; also fix lint --- src/view/com/modals/InviteCodes.tsx | 191 ++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 src/view/com/modals/InviteCodes.tsx (limited to 'src/view/com/modals/InviteCodes.tsx') diff --git a/src/view/com/modals/InviteCodes.tsx b/src/view/com/modals/InviteCodes.tsx new file mode 100644 index 000000000..5e31e16a8 --- /dev/null +++ b/src/view/com/modals/InviteCodes.tsx @@ -0,0 +1,191 @@ +import React from 'react' +import {StyleSheet, TouchableOpacity, View} from 'react-native' +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 {useStores} from 'state/index' +import {ScrollView} from './util' +import {usePalette} from 'lib/hooks/usePalette' +import {isDesktopWeb} from 'platform/detection' + +export const snapPoints = ['70%'] + +export function Component({}: {}) { + const pal = usePalette('default') + const store = useStores() + + const onClose = React.useCallback(() => { + store.shell.closeModal() + }, [store]) + + if (store.me.invites.length === 0) { + return ( + + + + You don't have any invite codes yet! We'll send you some when you've + been on Bluesky for a little longer. + + + + +