-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathindex.tsx
63 lines (60 loc) · 1.93 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import FontAwesome from '@expo/vector-icons/FontAwesome';
import { Link, Stack, type LinkProps } from 'expo-router';
import { Pressable, StyleSheet, Text, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
export default function TesterScreen() {
return (
<SafeAreaView style={styles.outerContainer}>
<Stack.Screen options={{ headerShown: false }} />
<View style={styles.container}>
<TestCase title="Apollo Client" route="/apollo-client/" />
<TestCase title="React Query" route="/react-query/" />
<TestCase title="React Query Time" route="/react-query-time/" />
<TestCase title="TinyBase" route="/tinybase/" />
<TestCase title="Vanilla Log Viewer" route="/vanilla-log-viewer/" />
<TestCase title="Async Storage" route="/async-storage/" />
<TestCase title="React Native MMKV" route="/react-native-mmkv/" />
<TestCase title="Redux" route="/redux/" />
</View>
</SafeAreaView>
);
}
function TestCase<T>({ title, route }: { title: string; route: LinkProps<T>['href'] }) {
return (
<Link href={route} asChild>
<Pressable style={styles.testCaseContainer}>
<Text style={styles.testCaseText}>{title}</Text>
<FontAwesome name="angle-right" size={20} color="#666" />
</Pressable>
</Link>
);
}
const styles = StyleSheet.create({
outerContainer: {
flex: 1,
justifyContent: 'center',
backgroundColor: '#eee',
},
container: {
borderRadius: 8,
borderWidth: 1,
borderColor: '#ccc',
marginHorizontal: 16,
flexDirection: 'column',
backgroundColor: '#fff',
},
testCaseContainer: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
paddingVertical: 16,
paddingHorizontal: 20,
borderBottomWidth: 1,
borderBottomColor: '#ccc',
},
testCaseText: {
fontSize: 20,
fontWeight: 'bold',
color: '#333',
},
});