Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
71538c5b
Commit
71538c5b
authored
Sep 09, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unused codes and cleanup
parent
de89481c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
UserLoginScreen.tsx
src/screens/UserLoginScreen.tsx
+2
-14
No files found.
src/screens/UserLoginScreen.tsx
View file @
71538c5b
...
@@ -7,25 +7,20 @@ import BackgroundDefault from "@components/backgrounds/BackgroundDefault";
...
@@ -7,25 +7,20 @@ import BackgroundDefault from "@components/backgrounds/BackgroundDefault";
import
Box
from
"@components/bases/Box"
;
import
Box
from
"@components/bases/Box"
;
import
Text
from
"@components/bases/Text"
;
import
Text
from
"@components/bases/Text"
;
import
{
Fontisto
}
from
"@expo/vector-icons"
;
import
{
Fontisto
}
from
"@expo/vector-icons"
;
import
{
LOG
}
from
"@logger"
;
import
{
containers
}
from
"@styles/Commons"
;
import
{
containers
}
from
"@styles/Commons"
;
import
{
useCallback
,
useState
}
from
"react"
;
import
{
useCallback
,
useState
}
from
"react"
;
import
{
TouchableOpacity
,
View
}
from
"react-native"
;
import
{
TouchableOpacity
,
View
}
from
"react-native"
;
import
{
useSafeAreaInsets
}
from
"react-native-safe-area-context"
;
import
{
LOG
}
from
"@logger"
;
import
{
KeyboardAwareScrollView
}
from
"react-native-keyboard-aware-scroll-view"
;
import
{
KeyboardAwareScrollView
}
from
"react-native-keyboard-aware-scroll-view"
;
const
log
=
LOG
.
extend
(
"UserLoginScreen"
);
const
log
=
LOG
.
extend
(
"UserLoginScreen"
);
const
UserLoginScreen
:
MainStackScreenComponentProps
<
"userLoginScreen"
>
=
({
navigation
})
=>
{
const
UserLoginScreen
:
MainStackScreenComponentProps
<
"userLoginScreen"
>
=
({
navigation
})
=>
{
log
.
debug
(
"UserLoginScreen"
);
log
.
debug
(
"UserLoginScreen"
);
const
insets
=
useSafeAreaInsets
();
const
{
login
,
isAuthenticating
}
=
useUserAuthenticationContext
();
const
{
setAuthenticationData
,
setUserInformations
,
login
,
isAuthenticating
}
=
useUserAuthenticationContext
();
// TODO : Remove default value for email and password
// TODO : Remove default value for email and password
const
[
email
,
setEmail
]
=
useState
(
"admin"
);
const
[
email
,
setEmail
]
=
useState
(
"admin"
);
const
[
password
,
setPassword
]
=
useState
(
"admin"
);
const
[
password
,
setPassword
]
=
useState
(
"admin"
);
const
[
error
,
setError
]
=
useState
(
""
);
const
submit
=
useCallback
(()
=>
{
const
submit
=
useCallback
(()
=>
{
login
(
email
,
password
);
login
(
email
,
password
);
...
@@ -81,19 +76,12 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
...
@@ -81,19 +76,12 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
/>
/>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
{
error
&&
(
<
Text
variant=
{
"error"
}
textAlign=
{
"center"
}
>
{
error
}
</
Text
>
)
}
<
Box
p=
{
"s"
}
>
<
Box
p=
{
"s"
}
>
<
Button
<
Button
variant=
{
"full"
}
variant=
{
"full"
}
textVariants=
{
"primary"
}
textVariants=
{
"primary"
}
label=
"Se connecter"
label=
"Se connecter"
onPress=
{
()
=>
{
onPress=
{
()
=>
{
// navigation.popToTop();
// navigation.navigate("bottomTabs");
submit
();
submit
();
}
}
}
}
isLoading=
{
isAuthenticating
}
isLoading=
{
isAuthenticating
}
...
...
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