Implement validation and proper type detection
This commit is contained in:
parent
1acef14a1c
commit
b9b0965000
7 changed files with 114 additions and 30 deletions
|
@ -221,14 +221,14 @@ function AdditionalPostText({
|
|||
additionalPost?: PostThreadViewModel
|
||||
}) {
|
||||
const pal = usePalette('default')
|
||||
if (!additionalPost) {
|
||||
if (!additionalPost || !additionalPost.thread?.postRecord) {
|
||||
return <View />
|
||||
}
|
||||
if (additionalPost.error) {
|
||||
return <ErrorMessage message={additionalPost.error} />
|
||||
}
|
||||
return (
|
||||
<Text style={pal.textLight}>{additionalPost.thread?.post.record.text}</Text>
|
||||
<Text style={pal.textLight}>{additionalPost.thread?.postRecord.text}</Text>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue