From e8843ded5bf1f3d97b735ffe8f8553de46f9b18b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Fri, 2 Jun 2023 15:01:04 -0500 Subject: 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 --- src/view/com/modals/CreateOrEditMuteList.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/view/com/modals/CreateOrEditMuteList.tsx') 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(false) - const [name, setName] = useState(list?.list.name || '') + const [name, setName] = useState(list?.list?.name || '') const [description, setDescription] = useState( - list?.list.description || '', + list?.list?.description || '', ) - const [avatar, setAvatar] = useState(list?.list.avatar) + const [avatar, setAvatar] = useState(list?.list?.avatar) const [newAvatar, setNewAvatar] = useState() 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') -- cgit 1.4.1