Conslidate and fix check for isValidRecord in Post.tsx
This commit is contained in:
@@ -53,10 +53,7 @@ export function Post({
|
||||
const moderationOpts = useModerationOpts()
|
||||
const record = useMemo<AppBskyFeedPost.Record | undefined>(
|
||||
() =>
|
||||
AppBskyFeedPost.isRecord(post.record) &&
|
||||
AppBskyFeedPost.validateRecord(post.record).success
|
||||
? post.record
|
||||
: undefined,
|
||||
AppBskyFeedPost.isValidRecord(post.record) ? post.record : undefined,
|
||||
[post],
|
||||
)
|
||||
const postShadowed = usePostShadow(post)
|
||||
|
||||
Reference in New Issue
Block a user