File tree Expand file tree Collapse file tree 2 files changed +43
-17
lines changed
Expand file tree Collapse file tree 2 files changed +43
-17
lines changed Original file line number Diff line number Diff line change @@ -2,27 +2,31 @@ import { Pressable, StyleSheet } from "react-native";
22
33import GradientBackgroundView from "@/components/GradientBackgroundView" ;
44import { ThemedText } from "@/components/ThemedText" ;
5+ import { VersionInfo } from "@/components/VersionInfo" ;
56import { Link } from "expo-router" ;
67
78export default function Index ( ) {
89 return (
9- < GradientBackgroundView style = { styles . container } >
10- < Link href = "/1" asChild >
11- < Pressable >
12- < ThemedText > Classic</ ThemedText >
13- </ Pressable >
14- </ Link >
15- < Link href = "/2" asChild >
16- < Pressable >
17- < ThemedText > Duo</ ThemedText >
18- </ Pressable >
19- </ Link >
20- < Link href = "/4" asChild >
21- < Pressable >
22- < ThemedText > Quad</ ThemedText >
23- </ Pressable >
24- </ Link >
25- </ GradientBackgroundView >
10+ < >
11+ < GradientBackgroundView style = { styles . container } >
12+ < Link href = "/1" asChild >
13+ < Pressable >
14+ < ThemedText > Classic</ ThemedText >
15+ </ Pressable >
16+ </ Link >
17+ < Link href = "/2" asChild >
18+ < Pressable >
19+ < ThemedText > Duo</ ThemedText >
20+ </ Pressable >
21+ </ Link >
22+ < Link href = "/4" asChild >
23+ < Pressable >
24+ < ThemedText > Quad</ ThemedText >
25+ </ Pressable >
26+ </ Link >
27+ </ GradientBackgroundView >
28+ < VersionInfo />
29+ </ >
2630 ) ;
2731}
2832
Original file line number Diff line number Diff line change 1+ import { StyleSheet , View } from "react-native" ;
2+
3+ import Constants from "expo-constants" ;
4+ import { ThemedText } from "./ThemedText" ;
5+
6+ export function VersionInfo ( ) {
7+ const version = Constants . expoConfig ?. version ;
8+
9+ return version ? (
10+ < View >
11+ < ThemedText style = { styles . versionInfo } > { `v${ version } ` } </ ThemedText >
12+ </ View >
13+ ) : null ;
14+ }
15+
16+ const styles = StyleSheet . create ( {
17+ versionInfo : {
18+ position : "absolute" ,
19+ bottom : 4 ,
20+ right : 4 ,
21+ } ,
22+ } ) ;
You can’t perform that action at this time.
0 commit comments