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
69e73606
Commit
69e73606
authored
Sep 11, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated to use the recent made wrapper and some twix
parent
5a0715d7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
UserLoginScreen.tsx
src/screens/UserLoginScreen.tsx
+19
-11
No files found.
src/screens/UserLoginScreen.tsx
View file @
69e73606
import
{
useUserAuthenticationContext
}
from
"@/contexts/UserAuthenticationContext"
;
import
{
useUserAuthenticationContext
}
from
"@/contexts/UserAuthenticationContext"
;
import
type
{
MainStackScreenComponentProps
}
from
"@/navigations/Types"
;
import
type
{
MainStackScreenComponentProps
}
from
"@/navigations/Types"
;
import
Button
from
"@components/Button"
;
import
Button
from
"@components/Button"
;
import
ContainerBorderTopCurved
from
"@components/ContainerBorderTopCurved"
;
import
InputWithTopLabel
from
"@components/InputWithTopLabel"
;
import
InputWithTopLabel
from
"@components/InputWithTopLabel"
;
import
BeasyDefaultBackgroundWrapper
from
"@components/backgrounds/BeasyDefaultBackground"
;
import
Box
from
"@components/bases/Box"
;
import
Box
from
"@components/bases/Box"
;
import
Text
from
"@components/bases/Text
"
;
import
WrapperWithDefaultBeasyBackgroundAndSafeAreaFull
from
"@components/wrappers/WrapperWithDefaultBeasyBackgroundAndSafeAreaFull
"
;
import
{
Fontisto
}
from
"@expo/vector-icons"
;
import
{
Fontisto
}
from
"@expo/vector-icons"
;
import
{
LOG
}
from
"@logger"
;
import
{
LOG
}
from
"@logger"
;
import
{
containers
}
from
"@styles/Commons"
;
import
Card
from
"@re-card"
;
import
Text
from
"@re-text"
;
import
{
useCallback
,
useState
}
from
"react"
;
import
{
useCallback
,
useState
}
from
"react"
;
import
{
TouchableOpacity
,
View
}
from
"react-native"
;
import
{
TouchableOpacity
}
from
"react-native"
;
import
{
KeyboardAwareScrollView
}
from
"react-native-keyboard-aware-scroll-view"
;
import
{
KeyboardAwareScrollView
}
from
"react-native-keyboard-aware-scroll-view"
;
import
{
useSafeAreaInsets
}
from
"react-native-safe-area-context"
;
const
log
=
LOG
.
extend
(
"UserLoginScreen"
);
const
log
=
LOG
.
extend
(
"UserLoginScreen"
);
const
UserLoginScreen
:
MainStackScreenComponentProps
<
"userLoginScreen"
>
=
({
navigation
})
=>
{
const
UserLoginScreen
:
MainStackScreenComponentProps
<
"userLoginScreen"
>
=
({
navigation
})
=>
{
...
@@ -21,14 +21,15 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
...
@@ -21,14 +21,15 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
// 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
insets
=
useSafeAreaInsets
();
const
submit
=
useCallback
(()
=>
{
const
submit
=
useCallback
(()
=>
{
login
(
email
,
password
);
login
(
email
,
password
);
},
[
email
,
password
,
login
]);
},
[
email
,
password
,
login
]);
return
(
return
(
<
BeasyDefaultBackgroundWrapper
>
<
WrapperWithDefaultBeasyBackgroundAndSafeAreaFull
>
<
View
style=
{
[
containers
.
containerFull
]
}
>
<
Box
height=
{
"100%"
}
>
<
Box
style=
{
{
height
:
"20%"
}
}
px=
{
"l"
}
>
<
Box
style=
{
{
height
:
"20%"
}
}
px=
{
"l"
}
>
<
Box
<
Box
px=
{
"m"
}
px=
{
"m"
}
...
@@ -45,7 +46,7 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
...
@@ -45,7 +46,7 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
</
TouchableOpacity
>
</
TouchableOpacity
>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
<
C
ontainerBorderTopCurved
>
<
C
ard
variant=
{
"curvedTopContainer"
}
style=
{
{
marginTop
:
"auto"
}
}
>
<
KeyboardAwareScrollView
<
KeyboardAwareScrollView
// extraScrollHeight={-125}
// extraScrollHeight={-125}
extraHeight=
{
10
}
extraHeight=
{
10
}
...
@@ -96,9 +97,16 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
...
@@ -96,9 +97,16 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
/>
/>
</
Box
>
</
Box
>
</
KeyboardAwareScrollView
>
</
KeyboardAwareScrollView
>
</
ContainerBorderTopCurved
>
</
Card
>
</
View
>
</
Box
>
</
BeasyDefaultBackgroundWrapper
>
<
Box
position=
{
"absolute"
}
bottom=
{
0
}
height=
{
insets
.
bottom
}
backgroundColor=
{
"white"
}
width=
{
"100%"
}
/>
</
WrapperWithDefaultBeasyBackgroundAndSafeAreaFull
>
);
);
};
};
...
...
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