diff options
Diffstat (limited to 'src/view/com/post-thread')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 12 | ||||
-rw-r--r-- | src/view/com/post-thread/PostVotedBy.tsx | 6 |
2 files changed, 12 insertions, 6 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> ) diff --git a/src/view/com/post-thread/PostVotedBy.tsx b/src/view/com/post-thread/PostVotedBy.tsx index f167a3ab7..9fd53da5e 100644 --- a/src/view/com/post-thread/PostVotedBy.tsx +++ b/src/view/com/post-thread/PostVotedBy.tsx @@ -1,7 +1,7 @@ import React, {useEffect} from 'react' import {observer} from 'mobx-react-lite' import {ActivityIndicator, FlatList, StyleSheet, View} from 'react-native' -import {VotesViewModel, VotesItem} from '../../../state/models/votes-view' +import {VotesViewModel, VoteItem} from '../../../state/models/votes-view' import {Link} from '../util/Link' import {Text} from '../util/text/Text' import {ErrorMessage} from '../util/error/ErrorMessage' @@ -56,7 +56,7 @@ export const PostVotedBy = observer(function PostVotedBy({ // loaded // = - const renderItem = ({item}: {item: VotesItem}) => <LikedByItem item={item} /> + const renderItem = ({item}: {item: VoteItem}) => <LikedByItem item={item} /> return ( <FlatList data={view.votes} @@ -76,7 +76,7 @@ export const PostVotedBy = observer(function PostVotedBy({ ) }) -const LikedByItem = ({item}: {item: VotesItem}) => { +const LikedByItem = ({item}: {item: VoteItem}) => { const pal = usePalette('default') return ( |