|
@@ -1,14 +1,40 @@
|
|
|
-import { Text, View } from "react-native";
|
|
|
+import { Link } from "expo-router";
|
|
|
+import { useState } from "react";
|
|
|
+import { Button, Text, TouchableOpacity, View} from "react-native";
|
|
|
|
|
|
export default function Index() {
|
|
|
+ const [contador, setContador] = useState(0)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return (
|
|
|
- <View style={{
|
|
|
- flex: 1,
|
|
|
- backgroundColor: 'yellow',
|
|
|
- justifyContent: 'center',
|
|
|
- alignItems: 'center'
|
|
|
- }}>
|
|
|
- <Text style={{fontSize: 30}}>Tela inicial</Text>
|
|
|
- </View>
|
|
|
+ <View style={{flex: 1, padding: 20}}>
|
|
|
+ <View style={{flex: 1, gap: 10}}>
|
|
|
+ <Text style={{fontSize: 24}}>
|
|
|
+ Tela Inicial
|
|
|
+ </Text>
|
|
|
+ <Text>
|
|
|
+ Contador {contador}
|
|
|
+ </Text>
|
|
|
+
|
|
|
+ <Button
|
|
|
+ title="Incrementar"
|
|
|
+ onPress={() => setContador(contador+1)}
|
|
|
+ />
|
|
|
+ <Button
|
|
|
+ title="Desencrementar"
|
|
|
+ onPress={() => setContador(contador-1)}
|
|
|
+ color='red'
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ <View style={{flex: 1, justifyContent: "flex-end", gap: 10}}>
|
|
|
+ <Link href="/profile"
|
|
|
+ style={{padding: 10, backgroundColor: "#ddd", borderRadius: 5, alignItems: "center", textAlign: "center"}}>
|
|
|
+ <Text>Ir para o perfil</Text>
|
|
|
+ </Link>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
)
|
|
|
}
|