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
b9b6a73c
Commit
b9b6a73c
authored
Apr 01, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit header home
parent
d6f6d10a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
142 additions
and
16 deletions
+142
-16
images.js
src/assets/images.js
+2
-0
iconBtnGreen.png
src/assets/images/iconBtnGreen.png
+0
-0
iconCheck.png
src/assets/images/iconCheck.png
+0
-0
HeaderHome.js
src/components/Header/HeaderHome.js
+139
-15
StackNavigation.js
src/routers/StackNavigation.js
+1
-1
No files found.
src/assets/images.js
View file @
b9b6a73c
...
@@ -59,6 +59,8 @@ const images = {
...
@@ -59,6 +59,8 @@ const images = {
noti
:
require
(
'./images/noti1.png'
),
noti
:
require
(
'./images/noti1.png'
),
iconCopy
:
require
(
'./images/iconCopy.png'
),
iconCopy
:
require
(
'./images/iconCopy.png'
),
iconIntroduct
:
require
(
'./images/iconIntroduct.png'
),
iconIntroduct
:
require
(
'./images/iconIntroduct.png'
),
iconBtnGreen
:
require
(
'./images/iconBtnGreen.png'
),
iconCheck
:
require
(
'./images/iconCheck.png'
),
};
};
export
default
images
;
export
default
images
;
src/assets/images/iconBtnGreen.png
0 → 100644
View file @
b9b6a73c
10.5 KB
src/assets/images/iconCheck.png
0 → 100644
View file @
b9b6a73c
1.48 KB
src/components/Header/HeaderHome.js
View file @
b9b6a73c
...
@@ -26,12 +26,85 @@ import {
...
@@ -26,12 +26,85 @@ import {
TRANSFER
,
TRANSFER
,
HISTORY
,
HISTORY
,
PROFILE
,
PROFILE
,
AccountVerification
,
}
from
'../../routers/ScreenNames'
;
}
from
'../../routers/ScreenNames'
;
const
HeaderHome
=
(
prop
s
)
=>
{
const
renderWallet
=
(
statu
s
)
=>
{
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
if
(
status
==
3
)
return
(
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{
styles
.
containerWallet
}
>
<
Text
style
=
{
styles
.
txtWallet
}
>
T
à
i
kho
ả
n
v
í
<
/Text
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
toPriceVnd
(
1000000
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtUnit
}
>
Đ
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#EDEDF1'
,
height
:
'100%'
}}
/
>
<
View
style
=
{
styles
.
containerWallet
}
>
<
Text
style
=
{
styles
.
txtWallet
}
>
T
à
i
kho
ả
n
CQG
<
/Text
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
toPriceVnd
(
1000000
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtUnit
}
>
Đ
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
);
if
(
status
==
4
)
return
(
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{
styles
.
containerWallet
}
>
<
Text
style
=
{
styles
.
txtWallet
}
>
T
à
i
kho
ả
n
v
í
<
/Text
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
toPriceVnd
(
1000000
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtUnit
}
>
Đ
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#EDEDF1'
,
height
:
'100%'
}}
/
>
<
View
style
=
{
styles
.
containerWallet
}
>
<
TouchableOpacity
style
=
{
styles
.
btn
}
>
<
Text
style
=
{
styles
.
txtWhite
}
>
M
ở
t
à
i
kho
ả
n
th
ậ
t
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
);
return
(
<
View
style
=
{{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
TouchableOpacity
disabled
=
{
status
==
2
?
true
:
false
}
onPress
=
{()
=>
navigate
.
navigate
(
AccountVerification
)}
>
<
ImageBackground
imageStyle
=
{{
borderRadius
:
10
}}
style
=
{{
width
:
320
,
height
:
60
,
borderRadius
:
10
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
source
=
{
R
.
images
.
iconBtnGreen
}
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
52
),
color
:
'white'
}}
>
{
status
==
2
?
'Chờ xác minh'
:
'Xác minh tài khoản'
}
<
/Text
>
<
/ImageBackground
>
<
/TouchableOpacity
>
<
/View
>
);
};
console
.
log
();
const
renderLabel
=
(
status
)
=>
{
if
(
status
==
1
)
return
<
Text
style
=
{{
color
:
'#E3434F'
}}
>
Ch
ư
a
x
á
c
minh
<
/Text>
;
if
(
status
==
2
)
return
<
Text
style
=
{{
color
:
'#FFB721'
}}
>
Ch
ờ
x
á
c
minh
<
/Text>
;
if
(
status
==
3
)
return
<
Text
style
=
{{
color
:
'#17B217'
}}
>
Đã
x
á
c
minh
<
/Text>
;
};
const
HeaderHome
=
(
props
)
=>
{
const
navigate
=
useNavigation
();
console
.
log
(
props
.
user
.
status
);
const
copyToClipboard
=
()
=>
{
const
copyToClipboard
=
()
=>
{
Alert
.
alert
(
'Đã sao chép!'
);
Alert
.
alert
(
'Đã sao chép!'
);
...
@@ -43,13 +116,25 @@ const HeaderHome = (props) => {
...
@@ -43,13 +116,25 @@ const HeaderHome = (props) => {
<
ImageBackground
style
=
{
styles
.
img
}
source
=
{
R
.
images
.
headerHome
}
>
<
ImageBackground
style
=
{
styles
.
img
}
source
=
{
R
.
images
.
headerHome
}
>
<
StatusBar
backgroundColor
=
"transparent"
translucent
=
{
true
}
/
>
<
StatusBar
backgroundColor
=
"transparent"
translucent
=
{
true
}
/
>
<
/ImageBackground
>
<
/ImageBackground
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
View
style
=
{
styles
.
containerTop
}
>
<
View
style
=
{
styles
.
containerTop
}
>
<
View
style
=
{
styles
.
containerInfor
}
>
<
View
style
=
{
styles
.
containerInfor
}
>
<
Image
source
=
{
R
.
images
.
avartar
}
style
=
{
styles
.
imgAvatar
}
/
>
<
Image
source
=
{
R
.
images
.
avartar
}
style
=
{
styles
.
imgAvatar
}
/
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
PROFILE
)}
>
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
PROFILE
)}
>
<
Text
style
=
{
styles
.
txtName
}
>
{
props
.
user
.
fullname
}
<
/Text
>
<
View
style
=
{{
flexDirection
:
'row'
,
alignItems
:
'center'
}}
>
<
Text
style
=
{
styles
.
txtName
}
>
{
props
.
user
.
fullname
}
<
/Text
>
{
props
.
user
.
status
==
3
?
(
<
Image
source
=
{
R
.
images
.
iconCheck
}
style
=
{{
width
:
20
,
height
:
20
,
marginLeft
:
20
}}
/
>
)
:
null
}
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
style
=
{
styles
.
row1
}
>
<
View
style
=
{
styles
.
row1
}
>
...
@@ -61,18 +146,13 @@ const HeaderHome = (props) => {
...
@@ -61,18 +146,13 @@ const HeaderHome = (props) => {
/
>
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
{
renderLabel
(
props
.
user
.
status
)}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
{
/* <View style={styles.row}>
<Text style={styles.txtMoney}>
{' '}
{props.user.current_money == 0
? 0
: toPriceVnd(props.user.current_money)}
</Text>
<Text style={styles.txtTitle}> Đ</Text>
</View> */
}
<
View
style
=
{
styles
.
wrapWallet
}
>
{
renderWallet
(
props
.
user
.
status
)}
<
/View
>
<
View
style
=
{
styles
.
containerMenu
}
>
<
View
style
=
{
styles
.
containerMenu
}
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
CHOOSEMETHOD
)}
onPress
=
{()
=>
navigate
.
navigate
(
CHOOSEMETHOD
)}
...
@@ -116,7 +196,12 @@ export default connect(mapStateToProps, {})(HeaderHome);
...
@@ -116,7 +196,12 @@ export default connect(mapStateToProps, {})(HeaderHome);
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
container
:
{},
container
:
{},
wrapWallet
:
{
height
:
80
,
width
:
'100%'
,
borderBottomWidth
:
1
,
borderBottomColor
:
'#EDEDF1'
,
},
img
:
{
img
:
{
height
:
Platform
.
OS
==
'ios'
?
HEIGHTXD
(
728
)
:
HEIGHTXD
(
808
),
height
:
Platform
.
OS
==
'ios'
?
HEIGHTXD
(
728
)
:
HEIGHTXD
(
808
),
width
:
'100%'
,
width
:
'100%'
,
...
@@ -125,9 +210,9 @@ const styles = StyleSheet.create({
...
@@ -125,9 +210,9 @@ const styles = StyleSheet.create({
alignItems
:
'center'
,
alignItems
:
'center'
,
},
},
containerTop
:
{
containerTop
:
{
backgroundColor
:
'white'
,
height
:
HEIGHTXD
(
856
),
height
:
HEIGHTXD
(
856
),
width
:
'90%'
,
width
:
'90%'
,
backgroundColor
:
'white'
,
borderRadius
:
10
,
borderRadius
:
10
,
shadowColor
:
'#000'
,
shadowColor
:
'#000'
,
shadowOffset
:
{
shadowOffset
:
{
...
@@ -165,6 +250,11 @@ const styles = StyleSheet.create({
...
@@ -165,6 +250,11 @@ const styles = StyleSheet.create({
fontSize
:
getFontXD
(
36
),
fontSize
:
getFontXD
(
36
),
color
:
R
.
colors
.
txtMain
,
color
:
R
.
colors
.
txtMain
,
},
},
txtWallet
:
{
fontSize
:
getFontXD
(
36
),
color
:
R
.
colors
.
txtMain
,
marginBottom
:
5
,
},
txtName
:
{
txtName
:
{
fontSize
:
getFontXD
(
52
),
fontSize
:
getFontXD
(
52
),
color
:
'#00359C'
,
color
:
'#00359C'
,
...
@@ -214,4 +304,38 @@ const styles = StyleSheet.create({
...
@@ -214,4 +304,38 @@ const styles = StyleSheet.create({
justifyContent
:
'space-between'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
},
},
containerWallet
:
{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
,
},
txtMoney
:
{
fontSize
:
getFontXD
(
46
),
color
:
'#FFB721'
,
},
txtUnit
:
{
fontSize
:
getFontXD
(
46
),
marginLeft
:
10
,
color
:
'#A2A2A2'
,
},
txtWhite
:
{
fontSize
:
getFontXD
(
36
),
color
:
R
.
colors
.
white
,
textTransform
:
'uppercase'
,
fontWeight
:
'bold'
,
},
btn
:
{
paddingHorizontal
:
10
,
paddingVertical
:
10
,
backgroundColor
:
R
.
colors
.
main
,
borderRadius
:
10
,
shadowColor
:
'#AFA9A9'
,
shadowOffset
:
{
width
:
0
,
height
:
1
,
},
shadowOpacity
:
0.25
,
shadowRadius
:
1.84
,
elevation
:
1
,
},
});
});
src/routers/StackNavigation.js
View file @
b9b6a73c
...
@@ -48,7 +48,7 @@ function MyStack(props) {
...
@@ -48,7 +48,7 @@ function MyStack(props) {
headerStatusBarHeight
:
0
,
headerStatusBarHeight
:
0
,
}}
}}
headerMode
=
{
'none'
}
headerMode
=
{
'none'
}
initialRouteName
=
{
ScreenName
.
PACKETCQG
}
>
initialRouteName
=
{
ScreenName
.
AUTHEN
}
>
<
Stack
.
Screen
name
=
{
ScreenName
.
LOGINSCREEN
}
component
=
{
Login
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
LOGINSCREEN
}
component
=
{
Login
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
NOTIFICATION
}
component
=
{
Notification
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
NOTIFICATION
}
component
=
{
Notification
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
TABNAVIGATOR
}
component
=
{
TabNavigator
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
TABNAVIGATOR
}
component
=
{
TabNavigator
}
/
>
...
...
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