Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Giang Tran
InvestCustomer
Commits
2fb5c01d
Commit
2fb5c01d
authored
May 13, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add version
parent
64a81713
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
Drawer.js
src/components/Header/Drawer.js
+22
-2
No files found.
src/components/Header/Drawer.js
View file @
2fb5c01d
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
import
{
View
,
View
,
Text
,
Text
,
...
@@ -11,6 +11,8 @@ import R from '../../assets/R';
...
@@ -11,6 +11,8 @@ import R from '../../assets/R';
import
{
HEIGHTXD
,
getFontXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
HEIGHTXD
,
getFontXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
Icon
from
'react-native-vector-icons/MaterialIcons'
;
import
Icon
from
'react-native-vector-icons/MaterialIcons'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
DeviceInfo
from
'react-native-device-info'
;
import
{
import
{
AccountVerification
,
AccountVerification
,
METHODPAY
,
METHODPAY
,
...
@@ -34,6 +36,7 @@ import {useNavigation} from '@react-navigation/native';
...
@@ -34,6 +36,7 @@ import {useNavigation} from '@react-navigation/native';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
AppText
from
'../AppText'
;
import
AppText
from
'../AppText'
;
import
images
from
'../../assets/images'
;
import
images
from
'../../assets/images'
;
import
I18n
from
'../../helper/i18/i18n'
;
const
menus
=
[
const
menus
=
[
{
{
...
@@ -158,10 +161,20 @@ const Drawer = (props) => {
...
@@ -158,10 +161,20 @@ const Drawer = (props) => {
const
[
imgAvatart
,
setImgAvatart
]
=
useState
(
props
.
user
.
picture_url
);
const
[
imgAvatart
,
setImgAvatart
]
=
useState
(
props
.
user
.
picture_url
);
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
const
[
listMenu
,
setListMenu
]
=
useState
(
menus
);
const
[
listMenu
,
setListMenu
]
=
useState
(
menus
);
const
[
version
,
setVersion
]
=
useState
(
''
);
useEffect
(()
=>
{
let
version
=
`
${
I18n
.
t
(
'Version'
,
)}
:
${
DeviceInfo
.
getVersion
()}
(
${
DeviceInfo
.
getBuildNumber
()}
)`
;
setVersion
(
version
);
},
[]);
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
header
}
>
<
Image
source
=
{
imgAvatart
?
{
uri
:
imgAvatart
}
:
R
.
images
.
avartar
}
style
=
{
styles
.
imgAvatar
}
/
>
<
Image
source
=
{
imgAvatart
?
{
uri
:
imgAvatart
}
:
R
.
images
.
avartar
}
style
=
{
styles
.
imgAvatar
}
/
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
{
onPress
=
{()
=>
{
props
.
toggleModal
();
props
.
toggleModal
();
...
@@ -250,6 +263,13 @@ const Drawer = (props) => {
...
@@ -250,6 +263,13 @@ const Drawer = (props) => {
<
Icon
name
=
{
'logout'
}
size
=
{
25
}
color
=
{
'#F81515'
}
/
>
<
Icon
name
=
{
'logout'
}
size
=
{
25
}
color
=
{
'#F81515'
}
/
>
<
AppText
i18nKey
=
{
'Logout'
}
Logout
style
=
{
styles
.
txtTitle
}
><
/AppText
>
<
AppText
i18nKey
=
{
'Logout'
}
Logout
style
=
{
styles
.
txtTitle
}
><
/AppText
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
Text
style
=
{[
styles
.
txtTitle
,
{
textAlign
:
'center'
,
marginTop
:
HEIGHTXD
(
20
)},
]}
>
{
version
}
<
/Text
>
<
/View
>
<
/View
>
);
);
};
};
...
...
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