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
64a81713
Commit
64a81713
authored
May 13, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_phase2' of
http://git.dcv.vn/tdgiangdev/InvestCustomer
into dev_phase2
parents
7d089f9a
49c2f416
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
294 additions
and
225 deletions
+294
-225
Home.js
src/Screens/Home/Home.js
+58
-1
HomeView.js
src/Screens/Home/HomeView.js
+4
-0
PriceListView.js
src/Screens/Home/PriceListView.js
+29
-21
Drawer.js
src/components/Header/Drawer.js
+2
-1
PickerAvatart.js
src/components/Picker/PickerAvatart.js
+201
-202
No files found.
src/Screens/Home/Home.js
View file @
64a81713
...
...
@@ -17,7 +17,15 @@ const Home = (props) => {
const
[
dataPriceFilter
,
setDataPriceFilter
]
=
useState
([]);
const
[
listImage
,
setListImage
]
=
useState
([]);
const
[
filters
,
setFilters
]
=
useState
([]);
const
[
filterId
,
setFilterId
]
=
useState
(
-
1
);
const
[
filterId
,
setFilterId
]
=
useState
(
null
);
const
[
isSortName
,
setIsSortName
]
=
useState
(
null
);
const
[
isSortPercent
,
setIsSortPercent
]
=
useState
(
null
);
const
[
isSortPriceOpenClose
,
setIsSortPriceOpenClose
]
=
useState
(
null
);
const
[
isSortPriceHighLow
,
setIsSortPriceHighLow
]
=
useState
(
null
);
const
SORT_TYPE
=
{
DESC
:
'DESC'
,
ASC
:
'ASC'
}
useEffect
(()
=>
{
getData
();
initSocket
();
...
...
@@ -91,6 +99,51 @@ const Home = (props) => {
console
.
log
(
id
,
newList
);
};
const
onSortByName
=
()
=>
{
let
type
=
'ASC'
if
(
!
isSortName
||
isSortName
==
SORT_TYPE
.
ASC
)
type
=
SORT_TYPE
.
DESC
let
newData
=
type
==
SORT_TYPE
.
ASC
?
[...
dataPriceFilter
].
sort
((
a
,
b
)
=>
a
.
name
>
b
.
name
?
1
:
-
1
)
:
[...
dataPriceFilter
].
sort
((
a
,
b
)
=>
a
.
name
<
b
.
name
?
1
:
-
1
)
setDataPriceFilter
(
newData
)
setIsSortPriceOpenClose
(
null
)
setIsSortName
(
type
)
setIsSortPercent
(
null
)
setIsSortPriceHighLow
(
null
)
}
const
onSortByPercent
=
()
=>
{
let
type
=
'ASC'
if
(
!
isSortPercent
||
isSortPercent
==
SORT_TYPE
.
ASC
)
type
=
SORT_TYPE
.
DESC
let
newData
=
type
==
SORT_TYPE
.
ASC
?
[...
dataPriceFilter
].
sort
((
a
,
b
)
=>
a
.
change
>
b
.
change
?
1
:
-
1
)
:
[...
dataPriceFilter
].
sort
((
a
,
b
)
=>
a
.
change
<
b
.
change
?
1
:
-
1
)
setDataPriceFilter
(
newData
)
setIsSortPriceOpenClose
(
null
)
setIsSortName
(
null
)
setIsSortPercent
(
type
)
setIsSortPriceHighLow
(
null
)
}
const
onSortByPriceOpenClose
=
()
=>
{
let
type
=
'ASC'
if
(
!
isSortPriceOpenClose
||
isSortPriceOpenClose
==
SORT_TYPE
.
ASC
)
type
=
SORT_TYPE
.
DESC
let
newData
=
type
==
SORT_TYPE
.
ASC
?
[...
dataPriceFilter
].
sort
((
a
,
b
)
=>
a
.
open_price
>
b
.
open_price
?
1
:
-
1
)
:
[...
dataPriceFilter
].
sort
((
a
,
b
)
=>
a
.
open_price
<
b
.
open_price
?
1
:
-
1
)
setDataPriceFilter
(
newData
)
setIsSortPriceOpenClose
(
type
)
setIsSortName
(
null
)
setIsSortPercent
(
null
)
setIsSortPriceHighLow
(
null
)
}
const
onSortByPriceHighLow
=
()
=>
{
let
type
=
'ASC'
if
(
!
isSortPriceHighLow
||
isSortPriceHighLow
==
SORT_TYPE
.
ASC
)
type
=
SORT_TYPE
.
DESC
let
newData
=
type
==
SORT_TYPE
.
ASC
?
[...
dataPriceFilter
].
sort
((
a
,
b
)
=>
a
.
high_price
>
b
.
high_price
?
1
:
-
1
)
:
[...
dataPriceFilter
].
sort
((
a
,
b
)
=>
a
.
high_price
<
b
.
high_price
?
1
:
-
1
)
setDataPriceFilter
(
newData
)
setIsSortPriceOpenClose
(
null
)
setIsSortName
(
null
)
setIsSortPercent
(
null
)
setIsSortPriceHighLow
(
type
)
}
return
<
HomeView
data
=
{
data
}
dataPrice
=
{
dataPriceFilter
}
...
...
@@ -98,6 +151,10 @@ const Home = (props) => {
filterId
=
{
filterId
}
filters
=
{
filters
}
setFilterId
=
{
changeFilter
}
onSortByName
=
{
onSortByName
}
onSortByPercent
=
{
onSortByPercent
}
onSortByPriceOpenClose
=
{
onSortByPriceOpenClose
}
onSortByPriceHighLow
=
{
onSortByPriceHighLow
}
/>
;
};
...
...
src/Screens/Home/HomeView.js
View file @
64a81713
...
...
@@ -29,6 +29,10 @@ const HomeView = (props) => {
filterId
=
{
props
.
filterId
}
filters
=
{
props
.
filters
}
dataPrice
=
{
props
.
dataPrice
}
onSortByName
=
{
props
.
onSortByName
}
onSortByPercent
=
{
props
.
onSortByPercent
}
onSortByPriceOpenClose
=
{
props
.
onSortByPriceOpenClose
}
onSortByPriceHighLow
=
{
props
.
onSortByPriceHighLow
}
/
>
<
/ScrollView
>
<
/ImageBackground
>
...
...
src/Screens/Home/PriceListView.js
View file @
64a81713
...
...
@@ -15,7 +15,7 @@ import {PRODUCTDETAIL} from '../../routers/ScreenNames';
import
{
useNavigation
}
from
'@react-navigation/native'
;
const
PriceListView
=
(
props
)
=>
{
const
{
setFilterId
,
filters
,
dataPrice
,
filterId
}
=
props
;
const
{
setFilterId
,
filters
,
dataPrice
,
filterId
,
onSortByName
,
onSortByPercent
,
onSortByPriceOpenClose
,
onSortByPriceHighLow
}
=
props
;
const
navigate
=
useNavigation
();
return
(
<
View
style
=
{{
flex
:
1
}}
>
...
...
@@ -44,26 +44,34 @@ const PriceListView = (props) => {
data
=
{
dataPrice
}
ListHeaderComponent
=
{()
=>
<
View
style
=
{[
styles
.
container
]}
>
<
View
style
=
{[
styles
.
headerContent
,
{
flex
:
0.3
,
justifyContent
:
'flex-start'
,
alignItems
:
'center'
,
}]}
>
<
Text
>
T
ê
n
<
/Text
>
<
Image
source
=
{
R
.
images
.
iconSort
}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
View
style
=
{[
styles
.
headerContent
,
{
flex
:
1.5
}]}
>
<
Text
>
T
ỷ
l
ệ
thay
đổ
i
<
/Text
>
<
Image
source
=
{
R
.
images
.
iconSort
}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
View
style
=
{[
styles
.
headerContent
]}
>
<
Text
>
Gi
á
m
ở
/
đó
ng
<
/Text
>
<
Image
source
=
{
R
.
images
.
iconSort
}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
View
style
=
{[
styles
.
headerContent
]}
>
<
Text
>
Gi
á
cao
/
th
ấ
p
<
/Text
>
<
Image
source
=
{
R
.
images
.
iconSort
}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
TouchableOpacity
style
=
{{
flex
:
0.3
}}
onPress
=
{()
=>
onSortByName
()}
>
<
View
style
=
{[
styles
.
headerContent
,
{
flex
:
0.3
,
justifyContent
:
'flex-start'
,
alignItems
:
'center'
,
}]}
>
<
Text
>
T
ê
n
<
/Text
>
<
Image
source
=
{
R
.
images
.
iconSort
}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{[
styles
.
headerContent
,
{
flex
:
1.5
}]}
onPress
=
{()
=>
onSortByPercent
()}
>
<
View
style
=
{[
styles
.
headerContent
]}
>
<
Text
>
T
ỷ
l
ệ
thay
đổ
i
<
/Text
>
<
Image
source
=
{
R
.
images
.
iconSort
}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
headerContent
}
onPress
=
{()
=>
onSortByPriceOpenClose
()}
>
<
View
style
=
{[
styles
.
headerContent
]}
>
<
Text
>
Gi
á
m
ở
/
đó
ng
<
/Text
>
<
Image
source
=
{
R
.
images
.
iconSort
}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{{
flex
:
1
}}
onPress
=
{()
=>
onSortByPriceHighLow
()}
>
<
View
style
=
{[
styles
.
headerContent
]}
>
<
Text
>
Gi
á
cao
/
th
ấ
p
<
/Text
>
<
Image
source
=
{
R
.
images
.
iconSort
}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
/TouchableOpacity
>
<
/View>
}
renderItem
=
{({
item
})
=>
<
ItemPrice
item
=
{
item
}
onPress
=
{()
=>
navigate
.
navigate
(
PRODUCTDETAIL
,
{
...
...
src/components/Header/Drawer.js
View file @
64a81713
...
...
@@ -155,12 +155,13 @@ const menus = [
];
const
Drawer
=
(
props
)
=>
{
const
[
imgAvatart
,
setImgAvatart
]
=
useState
(
props
.
user
.
picture_url
);
const
navigate
=
useNavigation
();
const
[
listMenu
,
setListMenu
]
=
useState
(
menus
);
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
header
}
>
<
Image
source
=
{
R
.
images
.
avartar
}
style
=
{
styles
.
imgAvatar
}
/
>
<
Image
source
=
{
imgAvatart
?
{
uri
:
imgAvatart
}
:
R
.
images
.
avartar
}
style
=
{
styles
.
imgAvatar
}
/
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
toggleModal
();
...
...
src/components/Picker/PickerAvatart.js
View file @
64a81713
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
View
,
Text
,
Image
,
StyleSheet
,
TouchableOpacity
,
TouchableWithoutFeedback
,
Platform
,
Alert
,
View
,
Text
,
Image
,
StyleSheet
,
TouchableOpacity
,
TouchableWithoutFeedback
,
Platform
,
Alert
,
}
from
'react-native'
;
import
R
from
'../../assets/R'
;
import
{
HEIGHTXD
,
WIDTHXD
,
getFontXD
}
from
'../../Config/Functions'
;
...
...
@@ -25,219 +25,218 @@ import {changeAvatart} from '../../apis/Functions/users';
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
const
options
=
{
title
:
'Select Avatar'
,
customButtons
:
[{
name
:
'fb'
,
title
:
'Choose Photo from Facebook'
}],
storageOptions
:
{
skipBackup
:
true
,
path
:
'images'
,
},
title
:
'Select Avatar'
,
customButtons
:
[{
name
:
'fb'
,
title
:
'Choose Photo from Facebook'
}],
storageOptions
:
{
skipBackup
:
true
,
path
:
'images'
,
},
};
const
PickerImg
=
(
props
)
=>
{
const
naviagtion
=
useNavigation
();
const
[
isModalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
imgAvatart
,
setImgAvatart
]
=
useState
(
props
.
user
.
picture_url
);
const
naviagtion
=
useNavigation
();
const
[
isModalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
imgAvatart
,
setImgAvatart
]
=
useState
(
props
.
user
.
picture_url
);
// useEffect(() => {
// setTimeout(() => {
// console.log('Affter', props.user.picture_url);
// setImgAvatart(props.user.picture_url);
// }, 500);
// }, [props.user]);
// useEffect(() => {
// setTimeout(() => {
// console.log('Affter', props.user.picture_url);
// setImgAvatart(props.user.picture_url);
// }, 500);
// }, [props.user]);
const
createFormData
=
(
photo
,
body
)
=>
{
const
data
=
new
FormData
();
data
.
append
(
'avatar'
,
{
name
:
'sign_img.jpg'
,
type
:
'image/jpg'
,
uri
:
Platform
.
OS
===
'android'
?
photo
:
photo
.
replace
(
'file://'
,
''
),
});
Object
.
keys
(
body
).
forEach
((
key
)
=>
{
data
.
append
(
key
,
body
[
key
]);
});
return
data
;
};
const
createFormData
=
(
photo
,
body
)
=>
{
const
data
=
new
FormData
();
data
.
append
(
'avatar'
,
{
name
:
'sign_img.jpg'
,
type
:
'image/jpg'
,
uri
:
Platform
.
OS
===
'android'
?
photo
:
photo
.
replace
(
'file://'
,
''
),
});
Object
.
keys
(
body
).
forEach
((
key
)
=>
{
data
.
append
(
key
,
body
[
key
]);
});
return
data
;
};
const
callApi
=
async
(
image
)
=>
{
props
.
showLoading
();
const
res
=
await
changeAvatart
(
createFormData
(
image
,
{
uid
:
props
.
user
.
uid
,
platform
:
Platform
.
OS
}),
);
console
.
log
(
'upload avatar'
,
res
);
props
.
hideLoading
();
if
(
res
?.
status
==
200
&&
res
.
data
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
},
500
);
}
else
{
setImgAvatart
(
props
.
user
.
picture_url
);
setTimeout
(()
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
},
500
);
}
}
else
{
setImgAvatart
(
props
.
user
.
picture_url
);
setTimeout
(()
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'upload fail'
);
},
500
);
}
};
const
callApi
=
async
(
image
)
=>
{
props
.
showLoading
();
const
res
=
await
changeAvatart
(
createFormData
(
image
,
{
uid
:
props
.
user
.
uid
,
platform
:
Platform
.
OS
}),
);
console
.
log
(
'upload avatar'
,
res
)
props
.
hideLoading
();
if
(
res
?.
status
==
200
&&
res
.
data
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
},
500
);
}
else
{
setImgAvatart
(
props
.
user
.
picture_url
);
setTimeout
(()
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
},
500
);
}
}
else
{
setImgAvatart
(
props
.
user
.
picture_url
);
setTimeout
(()
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'upload fail'
);
},
500
);
}
};
const
onchoosGalery
=
()
=>
{
ImagePicker
.
openPicker
({
mediaType
:
'photo'
,
multiple
:
false
,
cropping
:
true
,
width
:
300
,
height
:
300
,
}).
then
((
image
)
=>
{
setModalVisible
(
false
);
callApi
(
image
.
path
);
setImgAvatart
(
image
.
path
);
});
};
const
onchoosGalery
=
()
=>
{
ImagePicker
.
openPicker
({
mediaType
:
'photo'
,
multiple
:
false
,
cropping
:
true
,
width
:
300
,
height
:
300
,
}).
then
((
image
)
=>
{
setModalVisible
(
false
);
callApi
(
image
.
path
);
setImgAvatart
(
image
.
path
);
});
};
const
onCapture
=
()
=>
{
ImagePicker
.
openCamera
({
mediaType
:
'photo'
,
multiple
:
false
,
width
:
300
,
height
:
300
,
cropping
:
true
,
}).
then
((
image
)
=>
{
setModalVisible
(
false
);
callApi
(
image
.
path
);
setImgAvatart
(
image
.
path
);
});
};
return
(
<
TouchableOpacity
onPress
=
{()
=>
setModalVisible
(
true
)}
>
<
View
style
=
{
styles
.
containerImg
}
>
{
imgAvatart
?
(
<
Image
source
=
{{
uri
:
imgAvatart
}}
style
=
{
styles
.
imgAvatar
}
/
>
)
:
(
<
View
style
=
{
styles
.
imgAvatar
}
/
>
)
}
const
onCapture
=
()
=>
{
ImagePicker
.
openCamera
({
mediaType
:
'photo'
,
multiple
:
false
,
width
:
300
,
height
:
300
,
cropping
:
true
,
}).
then
((
image
)
=>
{
setModalVisible
(
false
);
callApi
(
image
.
path
);
setImgAvatart
(
image
.
path
);
});
};
return
(
<
TouchableOpacity
onPress
=
{()
=>
setModalVisible
(
true
)}
>
<
View
style
=
{
styles
.
containerImg
}
>
{
/*{imgAvatart ? (*/
}
<
Image
source
=
{
imgAvatart
?
{
uri
:
imgAvatart
}
:
R
.
images
.
avartar
}
style
=
{
styles
.
imgAvatar
}
/
>
{
/*) : (*/
}
{
/* <View style={styles.imgAvatar}/>*/
}
{
/*)}*/
}
<
View
style
=
{
styles
.
iconPicker
}
>
<
Image
style
=
{{
width
:
20
,
height
:
20
}}
source
=
{
R
.
images
.
imagePicker
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
iconPicker
}
>
<
Image
style
=
{{
width
:
20
,
height
:
20
}}
source
=
{
R
.
images
.
imagePicker
}
/
>
<
/View
>
<
/View
>
<
Modal
isVisible
=
{
isModalVisible
}
style
=
{{
margin
:
0
,
justifyContent
:
'flex-end'
}}
onSwipeComplete
=
{()
=>
setModalVisible
(
false
)}
swipeDirection
=
{[
'up'
,
'left'
,
'right'
,
'down'
]}
>
<
TouchableWithoutFeedback
onPress
=
{()
=>
setModalVisible
(
false
)}
>
<
View
style
=
{{
flex
:
1
}}
><
/View
>
<
/TouchableWithoutFeedback
>
<
Modal
isVisible
=
{
isModalVisible
}
style
=
{{
margin
:
0
,
justifyContent
:
'flex-end'
}}
onSwipeComplete
=
{()
=>
setModalVisible
(
false
)}
swipeDirection
=
{[
'up'
,
'left'
,
'right'
,
'down'
]}
>
<
TouchableWithoutFeedback
onPress
=
{()
=>
setModalVisible
(
false
)}
>
<
View
style
=
{{
flex
:
1
}}
><
/View
>
<
/TouchableWithoutFeedback
>
<
View
style
=
{
styles
.
containerSelect
}
>
<
AppText
i18nKey
=
{
'Select_source_image'
}
style
=
{{
textAlign
:
'center'
,
fontSize
:
getFontXD
(
42
),
fontWeight
:
'bold'
,
color
:
'#1473E6'
,
}}
/
>
<
View
style
=
{
styles
.
containerSelect
}
>
<
AppText
i18nKey
=
{
'Select_source_image'
}
style
=
{{
textAlign
:
'center'
,
fontSize
:
getFontXD
(
42
),
fontWeight
:
'bold'
,
color
:
'#1473E6'
,
}}
/
>
<
View
style
=
{
styles
.
line
}
/
>
<
Block
row
space
=
{
'around'
}
center
>
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
onPress
=
{
onCapture
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconCamera
}
/
>
<
View
style
=
{
styles
.
line
}
/
>
<
Block
row
space
=
{
'around'
}
center
>
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
onPress
=
{
onCapture
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconCamera
}
/
>
<
AppText
i18nKey
=
{
'Take_photo'
}
style
=
{
styles
.
txtTitleBtn
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
onPress
=
{
onchoosGalery
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconImg
}
/
>
<
AppText
i18nKey
=
{
'Take_photo'
}
style
=
{
styles
.
txtTitleBtn
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
onPress
=
{
onchoosGalery
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconImg
}
/
>
<
AppText
i18nKey
=
{
'Photo_library'
}
style
=
{
styles
.
txtTitleBtn
}
/
>
<
/TouchableOpacity
>
<
/Block
>
<
/View
>
<
/Modal
>
<
/TouchableOpacity
>
);
<
AppText
i18nKey
=
{
'Photo_library'
}
style
=
{
styles
.
txtTitleBtn
}
/
>
<
/TouchableOpacity
>
<
/Block
>
<
/View
>
<
/Modal
>
<
/TouchableOpacity
>
);
};
const
styles
=
StyleSheet
.
create
({
container
:
{
width
:
WIDTHXD
(
350
),
height
:
HEIGHTXD
(
280
),
backgroundColor
:
R
.
colors
.
white
,
borderRadius
:
10
,
borderWidth
:
2
,
borderColor
:
'#DBDBDB'
,
borderStyle
:
'dashed'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
txt
:
{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
marginBottom
:
5
,
paddingLeft
:
10
,
},
selectionImg
:
{
padding
:
10
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
containerSelect
:
{
height
:
HEIGHTXD
(
520
),
backgroundColor
:
'white'
,
paddingTop
:
10
,
borderTopLeftRadius
:
20
,
borderTopRightRadius
:
20
,
},
line
:
{
height
:
1
,
backgroundColor
:
'#929292'
,
width
:
'100%'
,
marginTop
:
5
,
},
imgIcon
:
{
width
:
40
,
height
:
40
,
},
txtTitleBtn
:
{
textAlign
:
'center'
,
fontSize
:
getFontXD
(
42
),
color
:
'#1473E6'
,
},
imgAvatar
:
{
width
:
WIDTHXD
(
180
),
height
:
WIDTHXD
(
180
),
borderRadius
:
WIDTHXD
(
90
),
},
containerImg
:
{
width
:
WIDTHXD
(
180
),
height
:
WIDTHXD
(
180
),
},
iconPicker
:
{
position
:
'absolute'
,
bottom
:
0
,
right
:
0
,
},
container
:
{
width
:
WIDTHXD
(
350
),
height
:
HEIGHTXD
(
280
),
backgroundColor
:
R
.
colors
.
white
,
borderRadius
:
10
,
borderWidth
:
2
,
borderColor
:
'#DBDBDB'
,
borderStyle
:
'dashed'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
txt
:
{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
marginBottom
:
5
,
paddingLeft
:
10
,
},
selectionImg
:
{
padding
:
10
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
containerSelect
:
{
height
:
HEIGHTXD
(
520
),
backgroundColor
:
'white'
,
paddingTop
:
10
,
borderTopLeftRadius
:
20
,
borderTopRightRadius
:
20
,
},
line
:
{
height
:
1
,
backgroundColor
:
'#929292'
,
width
:
'100%'
,
marginTop
:
5
,
},
imgIcon
:
{
width
:
40
,
height
:
40
,
},
txtTitleBtn
:
{
textAlign
:
'center'
,
fontSize
:
getFontXD
(
42
),
color
:
'#1473E6'
,
},
imgAvatar
:
{
width
:
WIDTHXD
(
180
),
height
:
WIDTHXD
(
180
),
borderRadius
:
WIDTHXD
(
90
),
},
containerImg
:
{
width
:
WIDTHXD
(
180
),
height
:
WIDTHXD
(
180
),
},
iconPicker
:
{
position
:
'absolute'
,
bottom
:
0
,
right
:
0
,
},
});
const
mapStateToProps
=
(
state
)
=>
{
return
{
user
:
state
.
userReducer
,
};
return
{
user
:
state
.
userReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{
saveUserToRedux
,
showLoading
,
hideLoading
,
saveUserToRedux
,
showLoading
,
hideLoading
,
})(
PickerImg
);
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