diff --git a/example/package.json b/example/package.json index 95e33c0a7..f2c12fab1 100644 --- a/example/package.json +++ b/example/package.json @@ -32,6 +32,7 @@ "react-native-encrypted-storage": "^4.0.3", "react-native-get-random-values": "^1.10.0", "react-native-mmkv": "^2.8.0", + "react-native-modal-selector": "^2.1.2", "react-native-quick-base64": "^2.0.8", "react-native-quick-crypto": "^0.6.1", "react-native-randombytes": "^3.6.1", diff --git a/example/src/LaunchScreen.tsx b/example/src/LaunchScreen.tsx index 326b3ee33..d0fbd4aee 100644 --- a/example/src/LaunchScreen.tsx +++ b/example/src/LaunchScreen.tsx @@ -2,6 +2,7 @@ import { NativeStackScreenProps } from '@react-navigation/native-stack' import { ConnectWallet, useSigner } from '@thirdweb-dev/react-native' import React, { useCallback, useEffect, useState } from 'react' import { Button, ScrollView, StyleSheet, Text, View } from 'react-native' +import ModalSelector from 'react-native-modal-selector' import * as XMTP from 'xmtp-react-native-sdk' import { useXmtp } from 'xmtp-react-native-sdk' @@ -12,9 +13,14 @@ import { useSavedKeys } from './hooks' const appVersion = 'XMTP_RN_EX/0.0.1' /// Prompt the user to run the tests, generate a wallet, or connect a wallet. -export default function LaunchScreen({ - navigation, -}: NativeStackScreenProps) { +export default function LaunchScreen( + this: any, + { navigation }: NativeStackScreenProps +) { + const [selectedNetwork, setSelectedNetwork] = useState< + 'dev' | 'local' | 'production' + >('dev') + const [enableGroups, setEnableGroups] = useState('true') const signer = useSigner() const [signerAddressDisplay, setSignerAddressDisplay] = useState() const { setClient } = useXmtp() @@ -48,6 +54,17 @@ export default function LaunchScreen({ console.log('Pre Enable Identity Callback') } + const networkOptions = [ + { key: 0, label: 'dev' }, + { key: 1, label: 'local' }, + // { key: 2, label: 'production' }, + ] + + const groupOptions = [ + { key: 0, label: 'true' }, + { key: 1, label: 'false' }, + ] + useEffect(() => { ;(async () => { if (signer) { @@ -62,89 +79,76 @@ export default function LaunchScreen({ return ( - - - Testing - - + Automated Tests +