move early return to after all hooks (#823)

zio/stable
Ansh 2023-06-01 08:41:27 -07:00 committed by GitHub
parent 54e5e30945
commit 5c25d670d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ import {
FontAwesomeIcon,
FontAwesomeIconStyle,
} from '@fortawesome/react-native-fontawesome'
import {PostsFeedItemModel} from 'state/models/feeds/posts'
import {PostsFeedItemModel} from 'state/models/feeds/post'
import {ModerationBehaviorCode} from 'lib/labeling/types'
import {Link, DesktopWebTextLink} from '../util/Link'
import {Text} from '../util/text/Text'
@ -135,10 +135,6 @@ export const FeedItem = observer(function ({
)
}, [track, item, setDeleted, store])
if (!record || deleted) {
return <View />
}
const isSmallTop = isThreadChild
const outerStyles = [
styles.outer,
@ -192,6 +188,10 @@ export const FeedItem = observer(function ({
[onPressReply, onPressToggleLike, onPressToggleRepost],
)
if (!record || deleted) {
return <View />
}
return (
<PostHider
testID={`feedItem-by-${item.post.author.handle}`}