Skip to content

Commit 0f9f052

Browse files
authored
Merge pull request #748 from topcoder-platform/issue-743
2 parents 471e36f + 8e379c6 commit 0f9f052

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/apps/onboarding/src/components/modal-upload-photo/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const ModalUploadPhoto: FC<ModalUploadPhotoProps> = (props: ModalUploadPhotoProp
2424
= useState<boolean>(false)
2525

2626
const onDrop = useCallback((acceptedFiles: File[]) => {
27-
setMyFiles([...myFiles, ...acceptedFiles])
28-
}, [myFiles])
27+
setMyFiles([...acceptedFiles])
28+
}, [])
2929

3030
const {
3131
getRootProps,
@@ -56,6 +56,7 @@ const ModalUploadPhoto: FC<ModalUploadPhotoProps> = (props: ModalUploadPhotoProp
5656
await updateMemberPhotoAsync(props.memberInfo.handle, formData)
5757
props.setMemberPhotoUrl(URL.createObjectURL(myFiles[0]))
5858
setMyFiles([])
59+
props.onClose?.()
5960
} catch (error) {
6061
}
6162

src/apps/onboarding/src/pages/onboarding/styles.module.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
border-radius: 16px;
2222
box-shadow: 0px 8px 24px 0px rgba(144, 144, 144, 0.15);
2323

24+
:global(.btn-icon) {
25+
svg {
26+
width: max-content;
27+
height: max-content;
28+
}
29+
}
30+
2431
@include ltemd {
2532
padding: 48px 16px;
2633
}

0 commit comments

Comments
 (0)