about summary refs log tree commit diff
path: root/src/view/com/post-thread/PostThreadItem.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-26 11:25:52 -0600
committerPaul Frazee <pfrazee@gmail.com>2023-01-26 11:25:52 -0600
commit7e3f6f030680a8cf7b5baa3ce6f33acd5766fca8 (patch)
tree38ad7a0c586caa6cd0635653cb812d602210b718 /src/view/com/post-thread/PostThreadItem.tsx
parentc4ba5e7fd507a2f5295fd3fcbcea0796223c744c (diff)
downloadvoidsky-7e3f6f030680a8cf7b5baa3ce6f33acd5766fca8.tar.zst
Fix all type errors
Diffstat (limited to 'src/view/com/post-thread/PostThreadItem.tsx')
-rw-r--r--src/view/com/post-thread/PostThreadItem.tsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx
index 92f7acc03..d39296285 100644
--- a/src/view/com/post-thread/PostThreadItem.tsx
+++ b/src/view/com/post-thread/PostThreadItem.tsx
@@ -3,7 +3,10 @@ import {observer} from 'mobx-react-lite'
 import {StyleSheet, View} from 'react-native'
 import Clipboard from '@react-native-clipboard/clipboard'
 import {AtUri} from '../../../third-party/uri'
-import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
+import {
+  FontAwesomeIcon,
+  FontAwesomeIconStyle,
+} from '@fortawesome/react-native-fontawesome'
 import {PostThreadViewPostModel} from '../../../state/models/post-thread-view'
 import {Link} from '../util/Link'
 import {RichText} from '../util/text/RichText'
@@ -59,7 +62,7 @@ export const PostThreadItem = observer(function PostThreadItem({
       replyTo: {
         uri: item.post.uri,
         cid: item.post.cid,
-        text: record.text as string,
+        text: record?.text as string,
         author: {
           handle: item.post.author.handle,
           displayName: item.post.author.displayName,
@@ -103,7 +106,10 @@ export const PostThreadItem = observer(function PostThreadItem({
   if (deleted) {
     return (
       <View style={[styles.outer, pal.border, pal.view, s.p20, s.flexRow]}>
-        <FontAwesomeIcon icon={['far', 'trash-can']} style={pal.icon} />
+        <FontAwesomeIcon
+          icon={['far', 'trash-can']}
+          style={pal.icon as FontAwesomeIconStyle}
+        />
         <Text style={[pal.textLight, s.ml10]}>This post has been deleted.</Text>
       </View>
     )