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
b3ab4668
Commit
b3ab4668
authored
Sep 23, 2021
by
IT18111170-Silva S.H.I
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update: login
parent
50f8c0e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
10 deletions
+54
-10
Navigations/AuthStack.js
Navigations/AuthStack.js
+49
-1
screen/PriceScreen.js
screen/PriceScreen.js
+0
-3
screen/SignIn.js
screen/SignIn.js
+5
-6
No files found.
Navigations/AuthStack.js
View file @
b3ab4668
import
React
from
"
react
"
;
import
{
createStackNavigator
}
from
"
@react-navigation/stack
"
;
import
{
Ionicons
}
from
"
@expo/vector-icons
"
;
import
{
MaterialIcons
}
from
'
@expo/vector-icons
'
;
import
{
SignIn
}
from
"
../screen/SignIn
"
;
import
{
SignUp
}
from
"
../screen/SignUp
"
;
import
{
HomeScreen
}
from
"
../screen/HomeScreen
"
;
...
...
@@ -30,6 +30,14 @@ export function AuthStack({ navigation }) {
);
},
headerLeftContainerStyle
:
{
paddingLeft
:
10
},
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
);
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -38,6 +46,14 @@ export function AuthStack({ navigation }) {
options
=
{{
title
:
"
Sign Up Page
"
,
headerTitleAlign
:
"
center
"
,
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
);
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -46,6 +62,14 @@ export function AuthStack({ navigation }) {
options
=
{{
title
:
"
Agripreneurs
"
,
headerTitleAlign
:
"
center
"
,
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
);
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -54,6 +78,14 @@ export function AuthStack({ navigation }) {
options
=
{{
title
:
"
Leaderboard Page
"
,
headerTitleAlign
:
"
center
"
,
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
);
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -62,6 +94,14 @@ export function AuthStack({ navigation }) {
options
=
{{
title
:
"
Discounted/Price Page
"
,
headerTitleAlign
:
"
center
"
,
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
);
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -70,6 +110,14 @@ export function AuthStack({ navigation }) {
options
=
{{
title
:
"
Gamification Page
"
,
headerTitleAlign
:
"
center
"
,
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
);
},
}}
/
>
<
Stack
.
Screen
...
...
screen/PriceScreen.js
View file @
b3ab4668
...
...
@@ -92,9 +92,6 @@ export function PriceScreen({ navigation, data }) {
<
TouchableOpacity
>
<
FontAwesome5
name
=
"
user-edit
"
size
=
{
30
}
color
=
"
black
"
/>
<
/TouchableOpacity
>
<
TouchableOpacity
>
<
AntDesign
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
secondContainer
}
>
<
View
style
=
{
styles
.
SectionStyle
}
>
...
...
screen/SignIn.js
View file @
b3ab4668
...
...
@@ -23,7 +23,7 @@ export function SignIn({ navigation }) {
});
const
textInputChange
=
(
val
)
=>
{
if
(
val
.
trim
().
length
>=
4
)
{
if
(
val
.
trim
().
length
>=
4
&&
val
.
includes
(
'
@
'
)
)
{
setData
({
...
data
,
email
:
val
,
...
...
@@ -41,7 +41,7 @@ export function SignIn({ navigation }) {
};
const
handlePasswordChange
=
(
val
)
=>
{
if
(
val
.
trim
().
length
>=
3
)
{
if
(
val
.
trim
().
length
>=
4
)
{
setData
({
...
data
,
password
:
val
,
...
...
@@ -93,7 +93,7 @@ export function SignIn({ navigation }) {
<
/View
>
{
data
.
isValidUser
?
null
:
(
<
Text
style
=
{
styles
.
errorMsg
}
>
Email
must
be
4
characters
long
Email
must
be
4
characters
long
and
iclude
@
<
/Text
>
)}
<
/View
>
...
...
@@ -114,7 +114,7 @@ export function SignIn({ navigation }) {
<
/View
>
{
data
.
isValidPassword
?
null
:
(
<
Text
style
=
{
styles
.
errorMsg
}
>
Password
must
be
6
characters
long
.
Password
must
be
minimum
4
characters
long
.
<
/Text
>
)}
<
/View
>
...
...
@@ -123,8 +123,6 @@ export function SignIn({ navigation }) {
style
=
{
styles
.
buttonSub
}
activeOpacity
=
{
0.5
}
onPress
=
{()
=>
axios
.
post
(
"
http://192.168.8.126:5000/login
"
,
form
)
.
then
(
function
(
response
)
{
const
stngobj
=
JSON
.
stringify
(
response
.
data
)
...
...
@@ -135,6 +133,7 @@ export function SignIn({ navigation }) {
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
alert
(
"
Login failed
"
)
})
}
>
...
...
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