Skip to content

Commit ef9a805

Browse files
feat: rework example UI (#107)
* fixup setup * feat: add basic screens * fixup * streaming * add logo to header
1 parent 80735c9 commit ef9a805

10 files changed

Lines changed: 949 additions & 828 deletions

File tree

apps/example-apple/assets/ck.png

5.15 KB
Loading

apps/example-apple/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@
3131
"react-native": "0.79.5",
3232
"react-native-audio-api": "^0.7.1",
3333
"react-native-bottom-tabs": "^0.11.0",
34+
"react-native-get-random-values": "^1.11.0",
35+
"react-native-gifted-chat": "^2.4.0",
36+
"react-native-keyboard-controller": "^1.18.6",
3437
"react-native-reanimated": "~3.17.4",
3538
"react-native-safe-area-context": "5.4.0",
3639
"react-native-screens": "4.15.4",
40+
"uuid": "^11.1.0",
3741
"web-streams-polyfill": "^4.1.0",
3842
"zod": "^4.0.0"
3943
},

apps/example-apple/src/App.tsx

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { NavigationContainer } from '@react-navigation/native'
55
import { createNativeStackNavigator } from '@react-navigation/native-stack'
66
import { StatusBar } from 'expo-status-bar'
77
import React from 'react'
8+
import { Image } from 'react-native'
89
import { SafeAreaProvider } from 'react-native-safe-area-context'
910

1011
import LLMScreen from './screens/LLMScreen'
@@ -23,7 +24,19 @@ const SpeechStack = createNativeStackNavigator()
2324
function LLMStackScreen() {
2425
return (
2526
<LLMStack.Navigator>
26-
<LLMStack.Screen name="LLMScreen" component={LLMScreen} />
27+
<LLMStack.Screen
28+
name="LLMScreen"
29+
component={LLMScreen}
30+
options={{
31+
headerTitle: () => (
32+
<Image
33+
source={require('../assets/ck.png')}
34+
style={{ width: 36, height: 36, marginTop: 10 }}
35+
resizeMode="contain"
36+
/>
37+
),
38+
}}
39+
/>
2740
</LLMStack.Navigator>
2841
)
2942
}
@@ -34,6 +47,9 @@ function PlaygroundStackScreen() {
3447
<PlaygroundStack.Screen
3548
name="PlaygroundScreen"
3649
component={PlaygroundScreen}
50+
options={{
51+
title: 'Playground',
52+
}}
3753
/>
3854
</PlaygroundStack.Navigator>
3955
)
@@ -45,6 +61,9 @@ function TranscribeStackScreen() {
4561
<TranscribeStack.Screen
4662
name="TranscribeScreen"
4763
component={TranscribeScreen}
64+
options={{
65+
title: 'Speech to Text',
66+
}}
4867
/>
4968
</TranscribeStack.Navigator>
5069
)
@@ -53,7 +72,13 @@ function TranscribeStackScreen() {
5372
function SpeechStackScreen() {
5473
return (
5574
<SpeechStack.Navigator>
56-
<SpeechStack.Screen name="SpeechScreen" component={SpeechScreen} />
75+
<SpeechStack.Screen
76+
name="SpeechScreen"
77+
component={SpeechScreen}
78+
options={{
79+
title: 'Text to Speech',
80+
}}
81+
/>
5782
</SpeechStack.Navigator>
5883
)
5984
}

0 commit comments

Comments
 (0)