about summary refs log tree commit diff
path: root/src/view/com/modals/EditProfile.tsx
diff options
context:
space:
mode:
authorOllie H <renahlee@outlook.com>2023-05-16 15:38:32 -0700
committerGitHub <noreply@github.com>2023-05-16 17:38:32 -0500
commit5f66adc9a656b79b76986395a73def9eed3d9776 (patch)
tree5c42de343a9cbe06bf382784f82c4e6930bbbe77 /src/view/com/modals/EditProfile.tsx
parentd5bec4ff37fb3423b8f083dd9fe95c066b4cf90e (diff)
downloadvoidsky-5f66adc9a656b79b76986395a73def9eed3d9776.tar.zst
Replace image picker with expo-image-picker (#649)
* Replace image picker with expo-image-picker

* Fix cropper & picker on web

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/view/com/modals/EditProfile.tsx')
-rw-r--r--src/view/com/modals/EditProfile.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/view/com/modals/EditProfile.tsx b/src/view/com/modals/EditProfile.tsx
index c26592fa9..f37a0f71a 100644
--- a/src/view/com/modals/EditProfile.tsx
+++ b/src/view/com/modals/EditProfile.tsx
@@ -65,7 +65,7 @@ export function Component({
   }
   const onSelectNewAvatar = useCallback(
     async (img: RNImage | null) => {
-      if (!img) {
+      if (img === null) {
         setNewUserAvatar(null)
         setUserAvatar(null)
         return
@@ -81,6 +81,7 @@ export function Component({
     },
     [track, setNewUserAvatar, setUserAvatar, setError],
   )
+
   const onSelectNewBanner = useCallback(
     async (img: RNImage | null) => {
       if (!img) {
@@ -99,6 +100,7 @@ export function Component({
     },
     [track, setNewUserBanner, setUserBanner, setError],
   )
+
   const onPressSave = useCallback(async () => {
     track('EditProfile:Save')
     setProcessing(true)