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
dfa0a536
Commit
dfa0a536
authored
3 years ago
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix image
parent
0b6c1cb8
switch_rsa
…
05_May
build_0106
build_01_July
build_02_July
build_06_07
build_11_June
build_1305
build_1405
build_14_June
build_15_july
build_2405
build_2505
build_2805
build_30_June
build_release_1806
build_server_new
dev_0106
dev_01_July
dev_05_July
dev_09_June
dev_10_June
dev_11_June
dev_14_July
dev_14_May
dev_18_June
dev_2605
dev_phase2
ekyc
enter_smart_otp
fix_bug_image
forgot_smart_otp_pin
func_fingerprint_login
func_smart_otp
new_09_June
new_10_June
phase2_home
phase2_tool
search_period
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
PickerAvatart.js
src/components/Picker/PickerAvatart.js
+6
-6
No files found.
src/components/Picker/PickerAvatart.js
View file @
dfa0a536
...
...
@@ -36,7 +36,7 @@ const options = {
const
PickerImg
=
(
props
)
=>
{
const
naviagtion
=
useNavigation
();
const
[
isModalVisible
,
setModalVisible
]
=
useState
(
false
);
//
const [imgAvatart, setImgAvatart] = useState(props.user.picture_url);
const
[
imgAvatart
,
setImgAvatart
]
=
useState
(
props
.
user
.
picture_url
);
// useEffect(() => {
// setTimeout(() => {
...
...
@@ -70,6 +70,7 @@ const PickerImg = (props) => {
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
);
...
...
@@ -86,6 +87,7 @@ const PickerImg = (props) => {
}).
then
((
image
)
=>
{
setModalVisible
(
false
);
callApi
(
image
.
path
);
setImgAvatart
(
image
.
path
);
});
};
...
...
@@ -99,16 +101,14 @@ const PickerImg = (props) => {
}).
then
((
image
)
=>
{
setModalVisible
(
false
);
callApi
(
image
.
path
);
setImgAvatart
(
image
.
path
);
});
};
return
(
<
TouchableOpacity
onPress
=
{()
=>
setModalVisible
(
true
)}
>
<
View
style
=
{
styles
.
containerImg
}
>
{
props
.
user
.
picture_url
?
(
<
Image
source
=
{{
uri
:
props
.
user
.
picture_url
}}
style
=
{
styles
.
imgAvatar
}
/
>
{
imgAvatart
?
(
<
Image
source
=
{{
uri
:
imgAvatart
}}
style
=
{
styles
.
imgAvatar
}
/
>
)
:
(
<
View
style
=
{
styles
.
imgAvatar
}
/
>
)}
...
...
This diff is collapsed.
Click to expand it.
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