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
7ffaece9
Commit
7ffaece9
authored
Sep 24, 2021
by
IT18111170-Silva S.H.I
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: delete update user
parent
9bb8811a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
254 additions
and
161 deletions
+254
-161
App.js
App.js
+7
-2
Navigations/BottomTab.js
Navigations/BottomTab.js
+32
-0
screen/HomeScreen.js
screen/HomeScreen.js
+64
-61
screen/PriceScreen.js
screen/PriceScreen.js
+150
-97
screen/SignIn.js
screen/SignIn.js
+1
-1
No files found.
App.js
View file @
7ffaece9
...
...
@@ -7,10 +7,14 @@ import { homeStack } from "./Navigations/homeStack";
import
{
AuthStack
}
from
"
./Navigations/AuthStack
"
;
import
{
FontAwesome
}
from
'
@expo/vector-icons
'
;
import
{
AboutUs
}
from
'
./screen/AboutUs
'
;
// import MainTabScreen from './screen/MainTabScreen';
// import {HomeScreen} from './screen/HomeScreen';
// import {HomeScreen} from './screen/HomeScreen'
// import {BottomTab} from './Navigations/BottomTab';
// import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
const
Drawer
=
createDrawerNavigator
();
// const Tab = createMaterialBottomTabNavigator();
export
default
function
App
()
{
...
...
@@ -19,10 +23,11 @@ export default function App() {
<
NavigationContainer
>
<
Drawer
.
Navigator
initialRouteName
=
"
Authntications
"
>
<
Drawer
.
Screen
name
=
"
Authentications
"
component
=
{
AuthStack
}
/
>
{
/* <Drawer.Screen name="Agripreneurs" component={
homeStack
} /> */
}
{
/* <Drawer.Screen name="Agripreneurs" component={
BottomTab
} /> */
}
{
/* <Drawer.Screen name="MainTab" component={MainTabScreen} /> */
}
{
/* <Drawer.Screen name="About Us" component={AboutUs} /> */
}
<
/Drawer.Navigator
>
{
/* <HomeScreen/> */
}
<
/NavigationContainer
>
);
}
...
...
Navigations/BottomTab.js
0 → 100644
View file @
7ffaece9
// import React from 'react';
// import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
// import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
// import { HomeScreen } from "../screen/HomeScreen";
// const Tab = createMaterialBottomTabNavigator();
// export function BottomTab() {
// return (
// <Tab.Navigator
// initialRouteName="HomeScreen"
// screenOptions={{
// tabBarActiveTintColor: '#e91e63',
// }}
// >
// <Tab.Screen
// name="HomeScreen"
// component={HomeScreen}
// options={{
// tabBarLabel: 'Home',
// tabBarIcon: ({ color, size }) => (
// <MaterialCommunityIcons name="home" color={color} size={size} />
// ),
// }}
// />
// </Tab.Navigator>
// );
// }
screen/HomeScreen.js
View file @
7ffaece9
...
...
@@ -2,71 +2,76 @@
// https://aboutreact.com/react-native-login-and-signup/
// Import React and Component
import
React
from
'
react
'
;
import
React
from
"
react
"
;
// import { StatusBar } from 'expo-status-bar';
import
{
StyleSheet
,
View
,
Text
,
TouchableOpacity
,
ImageBackground
}
from
"
react-native
"
;
import
{
StyleSheet
,
View
,
Text
,
TouchableOpacity
,
ImageBackground
,
}
from
"
react-native
"
;
import
ImageSliderz
from
"
react-native-image-slideshow
"
;
import
{
AntDesign
,
MaterialCommunityIcons
,
Ionicons
,
}
from
"
@expo/vector-icons
"
;
import
{
MaterialIcons
}
from
'
@expo/vector-icons
'
;
// import BottomTabNavigator from '../Navigations/BottomTabNavigator'
import
{
MaterialIcons
}
from
"
@expo/vector-icons
"
;
import
{
gamification
}
from
"
./gamification
"
;
// import BottomTab from "../Navigations/BottomTab";
export
function
HomeScreen
({
navigation
})
{
//to diable the yellow box warning on the simulator
console
.
disableYellowBox
=
true
;
return
(
<
View
style
=
{
styles
.
background
}
>
<
ImageBackground
source
=
{
require
(
'
../assets/signin1.jpg
'
)}
style
=
{
styles
.
images
}
>
<
ImageBackground
source
=
{
require
(
"
../assets/signin1.jpg
"
)}
style
=
{
styles
.
images
}
>
<
ImageSliderz
height
=
{
430
}
dataSource
=
{[
{
url
:
require
(
"
../assets/d.jpg
"
),
},
{
url
:
require
(
"
../assets/c.jpg
"
),
},
{
url
:
require
(
"
../assets/b.jpg
"
),
},
]}
/
>
<
View
>
<
TouchableOpacity
style
=
{
styles
.
saveExam
}
onPress
=
{()
=>
navigation
.
navigate
(
"
gamification
"
)}
>
<
Ionicons
name
=
"
game-controller
"
size
=
{
24
}
color
=
"
black
"
/>
<
Text
style
=
{
styles
.
buttonText
}
>
Gamification
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
>
<
TouchableOpacity
style
=
{
styles
.
saveExam
}
onPress
=
{()
=>
navigation
.
navigate
(
"
Leaderboard
"
)}
>
<
MaterialIcons
name
=
"
leaderboard
"
size
=
{
24
}
color
=
"
black
"
/>
<
Text
style
=
{
styles
.
buttonText
}
>
Leaderboard
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
Text
style
=
{
styles
.
heading
}
>
AGRIPRENEURS
.
Agriculture
solution
provider
.
<
/Text
>
<
Text
style
=
{
styles
.
heading1
}
>
Build
to
Empower
Entrepreneurs
<
/Text
>
<
Text
style
=
{
styles
.
heading2
}
>
All
Right
Reserved
.
<
/Text
>
<
ImageSliderz
height
=
{
430
}
dataSource
=
{[
{
url
:
require
(
"
../assets/d.jpg
"
),
},
{
url
:
require
(
"
../assets/c.jpg
"
),
},
{
url
:
require
(
"
../assets/b.jpg
"
),
},
]}
/
>
<
View
>
<
TouchableOpacity
style
=
{
styles
.
saveExam
}
onPress
=
{()
=>
navigation
.
navigate
(
'
gamification
'
)}
>
<
Ionicons
name
=
"
game-controller
"
size
=
{
24
}
color
=
"
black
"
/>
<
Text
style
=
{
styles
.
buttonText
}
>
Gamification
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
>
<
TouchableOpacity
style
=
{
styles
.
saveExam
}
onPress
=
{()
=>
navigation
.
navigate
(
'
Leaderboard
'
)}
>
<
MaterialIcons
name
=
"
leaderboard
"
size
=
{
24
}
color
=
"
black
"
/>
<
Text
style
=
{
styles
.
buttonText
}
>
Leaderboard
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
Text
style
=
{
styles
.
heading
}
>
AGRIPRENEURS
.
Agriculture
solution
provider
.
<
/Text
>
<
Text
style
=
{
styles
.
heading1
}
>
Build
to
Empower
Entrepreneurs
<
/Text
>
<
Text
style
=
{
styles
.
heading2
}
>
All
Right
Reserved
.
<
/Text
>
{
/* <BottomTabNavigator/> */
}
<
/ImageBackground
>
<
/View
>
<
/ImageBackground
>
{
/* <BottomTab/> */
}
<
/View
>
);
}
...
...
@@ -96,21 +101,19 @@ const styles = StyleSheet.create({
flexDirection
:
"
row
"
,
marginBottom
:
15
,
justifyContent
:
"
center
"
,
borderRadius
:
10
borderRadius
:
10
,
},
buttonText
:
{
color
:
"
#000
"
,
fontSize
:
15
,
marginLeft
:
8
marginLeft
:
8
,
},
background
:{
backgroundColor
:
'
#bababa
'
,
height
:
'
100%
'
background
:
{
backgroundColor
:
"
#bababa
"
,
height
:
"
100%
"
,
},
images
:
{
height
:
"
100%
"
,
justifyContent
:
"
center
"
,
},
images
:
{
height
:
'
100%
'
,
justifyContent
:
'
center
'
}
});
screen/PriceScreen.js
View file @
7ffaece9
This diff is collapsed.
Click to expand it.
screen/SignIn.js
View file @
7ffaece9
...
...
@@ -133,7 +133,7 @@ export function SignIn({ navigation }) {
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
alert
(
"
Login fail
ed
"
)
alert
(
"
No User Exist
ed
"
)
})
}
>
...
...
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