mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-31 02:26:50 +10:00
Send updated image only when file system is accessed
This commit is contained in:
parent
eba6121810
commit
c942f3b598
1 changed files with 3 additions and 1 deletions
|
|
@ -23,7 +23,9 @@ const onImageUploadHandler = (values, fn) => {
|
|||
const onSubmit = (values, fn) => {
|
||||
const { firstName, lastName, profileImage } = values;
|
||||
const name = { firstName, lastName };
|
||||
const updatedValues = profileImage.imageId
|
||||
|
||||
// Update profileImage only if file system has been accessed
|
||||
const updatedValues = profileImage.imageId && profileImage.file
|
||||
? { ...name, profileImageId: profileImage.imageId }
|
||||
: name;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue