Update: Buttons on homescreen

parent 7ffaece9
......@@ -32,7 +32,7 @@ export function HomeScreen({ navigation }) {
style={styles.images}
>
<ImageSliderz
height={430}
height={425}
dataSource={[
{
url: require("../assets/d.jpg"),
......@@ -45,6 +45,8 @@ export function HomeScreen({ navigation }) {
},
]}
/>
<View style={styles.HomeBtn}>
<View>
<TouchableOpacity
style={styles.saveExam}
......@@ -56,17 +58,43 @@ export function HomeScreen({ navigation }) {
</View>
<View>
<TouchableOpacity
style={styles.saveExam}
style={styles.Auction}
onPress={() => navigation.navigate("gamification")}
>
<Ionicons name="game-controller" size={24} color="black" />
<Text style={styles.buttonText}>Auction</Text>
</TouchableOpacity>
</View>
</View>
<View style={styles.HomeBtn}>
<View >
<TouchableOpacity
style={styles.IOT}
onPress={() => navigation.navigate("gamification")}
>
<Ionicons name="game-controller" size={24} color="black" />
<Text style={styles.buttonText}>IOT</Text>
</TouchableOpacity>
</View>
<View>
<TouchableOpacity
style={styles.Leaderboard}
onPress={() => navigation.navigate("Leaderboard")}
>
<MaterialIcons name="leaderboard" size={24} color="black" />
<Text style={styles.buttonText}>Leaderboard</Text>
</TouchableOpacity>
</View>
</View>
{/*
<Text style={styles.heading}>
AGRIPRENEURS. Agriculture solution provider.
</Text>
<Text style={styles.heading1}>Build to Empower Entrepreneurs</Text>
<Text style={styles.heading1}>Build to Empower Entrepreneurs</Text> */}
<Text style={styles.heading2}>All Right Reserved.</Text>
</ImageBackground>
......@@ -87,16 +115,16 @@ const styles = StyleSheet.create({
marginTop: 5,
},
heading2: {
fontSize: 10,
fontSize: 15,
alignSelf: "center",
marginTop: 5,
},
saveExam: {
width: "90%",
padding: 10,
width: "70%",
padding: 20,
marginTop: 25,
marginLeft: 20,
marginHorizontal: 10,
// marginHorizontal: 10,
backgroundColor: "#ff426e",
flexDirection: "row",
marginBottom: 15,
......@@ -116,4 +144,43 @@ const styles = StyleSheet.create({
height: "100%",
justifyContent: "center",
},
HomeBtn:{
flexDirection: "row",
alignItems: "flex-start",
justifyContent:"space-evenly",
marginLeft:20
},
Auction:{
width: "80%",
padding: 20,
marginTop: 25,
backgroundColor: "#ff426e",
flexDirection: "row",
marginBottom: 15,
justifyContent: "center",
borderRadius: 10,
},
Leaderboard:{
width: "75%",
padding: 20,
// marginTop: 25,
backgroundColor: "#ff426e",
flexDirection: "row",
marginBottom: 15,
justifyContent: "center",
borderRadius: 10,
marginLeft:20
},
IOT:{
width: "78%",
padding: 20,
// marginTop: 25,
backgroundColor: "#ff426e",
flexDirection: "row",
marginBottom: 15,
justifyContent: "center",
borderRadius: 10,
marginLeft:20
}
});
......@@ -5,6 +5,21 @@ import axios from 'axios'
import { ScrollView } from "react-native-gesture-handler";
import { FontAwesome } from "@expo/vector-icons";
// function getDetails(params) {
// axios.get("http://192.168.8.126:5000/getDetails")
// .then(function (response) {
// const stngobj = JSON.stringify(response.data)
// console.log(stngobj);
// alert("Successfully Update")
// // navigation.navigate("HomeScreen")
// // return response;
// })
// .catch(function (error) {
// console.log(error);
// alert("update error")
// })
// }
export function Leaderboard({ navigation, data }) {
......@@ -14,7 +29,7 @@ export function Leaderboard({ navigation, data }) {
<ScrollView style={styles.container}>
{/* <ImageBackground source={require('../assets/gamification.jpg')} style={styles.images}> */}
{/* {stngobj.map((stngobj) => */}
<TouchableOpacity style={styles.touchable} onPress={() => navigation.navigate('PriceScreen')}>
<View style={styles.card}>
......@@ -29,6 +44,9 @@ export function Leaderboard({ navigation, data }) {
</View>
</View>
</TouchableOpacity>
{/* )} */}
<TouchableOpacity style={styles.touchable} onPress={() => navigation.navigate('PriceScreen')}>
<View style={styles.card}>
......
......@@ -96,7 +96,7 @@ export function PriceScreen({ navigation, data }) {
})
.catch(function (error) {
console.log(error);
alert("Login failed")
alert("Please Insert new Data")
}) }
]
);
......@@ -162,7 +162,7 @@ export function PriceScreen({ navigation, data }) {
)}
</View>
<View style={styles.SectionStyle}>
{/* <View style={styles.SectionStyle}>
<View style={styles.textinputicon}>
<FontAwesome name="money" size={30} color="white" />
<TextInput
......@@ -181,7 +181,7 @@ export function PriceScreen({ navigation, data }) {
Email must be 4 characters long
</Text>
)}
</View>
</View> */}
<View style={styles.SectionStyle}>
<View style={styles.textinputicon}>
<Entypo name="location-pin" size={30} color="white" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment