Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-090 frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-090
2021-090 frontend
Commits
12dd55fc
Commit
12dd55fc
authored
Sep 25, 2021
by
IT18111170-Silva S.H.I
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update: Buttons on homescreen
parent
7ffaece9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
12 deletions
+97
-12
screen/HomeScreen.js
screen/HomeScreen.js
+75
-8
screen/Leaderboard.js
screen/Leaderboard.js
+19
-1
screen/PriceScreen.js
screen/PriceScreen.js
+3
-3
No files found.
screen/HomeScreen.js
View file @
12dd55fc
...
...
@@ -32,7 +32,7 @@ export function HomeScreen({ navigation }) {
style
=
{
styles
.
images
}
>
<
ImageSliderz
height
=
{
4
30
}
height
=
{
4
25
}
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
}
onPress
=
{()
=>
navigation
.
navigate
(
"
Leaderboard
"
)}
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
:
1
0
,
fontSize
:
1
5
,
alignSelf
:
"
center
"
,
marginTop
:
5
,
},
saveExam
:
{
width
:
"
9
0%
"
,
padding
:
1
0
,
width
:
"
7
0%
"
,
padding
:
2
0
,
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
}
});
screen/Leaderboard.js
View file @
12dd55fc
...
...
@@ -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
}
>
...
...
screen/PriceScreen.js
View file @
12dd55fc
...
...
@@ -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
"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment