about summary refs log tree commit diff
path: root/src/view/com/modals/CreateOrEditMuteList.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-06-02 15:01:04 -0500
committerGitHub <noreply@github.com>2023-06-02 15:01:04 -0500
commite8843ded5bf1f3d97b735ffe8f8553de46f9b18b (patch)
tree9c94613890fdc5428875dede148a5dd48e1c21a3 /src/view/com/modals/CreateOrEditMuteList.tsx
parent46c9de7c1865a57d2fef926db2d923a8687eca18 (diff)
downloadvoidsky-e8843ded5bf1f3d97b735ffe8f8553de46f9b18b.tar.zst
Fix a bunch of type errors and add a type-check to the github workflows (#837)
* Add yarn type-check

* Rename to yarn typecheck

* Fix a collection of type errors

* Add typecheck to automated tests

* add `dist` to exluded folders tsconfig

---------

Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
Diffstat (limited to 'src/view/com/modals/CreateOrEditMuteList.tsx')
-rw-r--r--src/view/com/modals/CreateOrEditMuteList.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/view/com/modals/CreateOrEditMuteList.tsx b/src/view/com/modals/CreateOrEditMuteList.tsx
index 736deae74..5e5130b3c 100644
--- a/src/view/com/modals/CreateOrEditMuteList.tsx
+++ b/src/view/com/modals/CreateOrEditMuteList.tsx
@@ -44,11 +44,11 @@ export function Component({
   const {track} = useAnalytics()
 
   const [isProcessing, setProcessing] = useState<boolean>(false)
-  const [name, setName] = useState<string>(list?.list.name || '')
+  const [name, setName] = useState<string>(list?.list?.name || '')
   const [description, setDescription] = useState<string>(
-    list?.list.description || '',
+    list?.list?.description || '',
   )
-  const [avatar, setAvatar] = useState<string | undefined>(list?.list.avatar)
+  const [avatar, setAvatar] = useState<string | undefined>(list?.list?.avatar)
   const [newAvatar, setNewAvatar] = useState<RNImage | undefined | null>()
 
   const onPressCancel = useCallback(() => {
@@ -59,7 +59,7 @@ export function Component({
     async (img: RNImage | null) => {
       if (!img) {
         setNewAvatar(null)
-        setAvatar(null)
+        setAvatar(undefined)
         return
       }
       track('CreateMuteList:AvatarSelected')