@@ -2,8 +2,10 @@ import { StatusBar } from "expo-status-bar";
22import { useEffect , useState } from "react" ;
33import { ActivityIndicator , Linking , StyleSheet , Text , TouchableOpacity , View } from "react-native" ;
44import { getLatestVersion , getStoreUrl , needsUpdate , VersionCheck } from "react-native-nitro-version-check" ;
5+ import BenchmarkScreen from "./BenchmarkScreen" ;
56
67export default function App ( ) {
8+ const [ screen , setScreen ] = useState < "main" | "benchmark" > ( "main" ) ;
79 const [ loading , setLoading ] = useState ( true ) ;
810 const [ storeUrl , setStoreUrl ] = useState < string | null > ( null ) ;
911 const [ latestVersion , setLatestVersion ] = useState < string | null > ( null ) ;
@@ -38,6 +40,10 @@ export default function App() {
3840 fetchAll ( ) ;
3941 } , [ ] ) ;
4042
43+ if ( screen === "benchmark" ) {
44+ return < BenchmarkScreen onBack = { ( ) => setScreen ( "main" ) } /> ;
45+ }
46+
4147 return (
4248 < View style = { styles . container } >
4349 { /* Sync properties — available immediately */ }
@@ -72,6 +78,12 @@ export default function App() {
7278 </ >
7379 ) }
7480
81+ < View style = { styles . divider } />
82+
83+ < TouchableOpacity style = { styles . benchmarkButton } onPress = { ( ) => setScreen ( "benchmark" ) } >
84+ < Text style = { styles . benchmarkButtonText } > Run Benchmark</ Text >
85+ </ TouchableOpacity >
86+
7587 < StatusBar style = "auto" />
7688 </ View >
7789 ) ;
@@ -114,4 +126,16 @@ const styles = StyleSheet.create({
114126 color : "#999" ,
115127 fontSize : 14 ,
116128 } ,
129+ benchmarkButton : {
130+ backgroundColor : "#007AFF" ,
131+ paddingVertical : 12 ,
132+ paddingHorizontal : 24 ,
133+ borderRadius : 10 ,
134+ marginTop : 8 ,
135+ } ,
136+ benchmarkButtonText : {
137+ color : "#fff" ,
138+ fontSize : 16 ,
139+ fontWeight : "600" ,
140+ } ,
117141} ) ;
0 commit comments