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 moderationOpts = useModerationOpts()
|
||||||
const record = useMemo<AppBskyFeedPost.Record | undefined>(
|
const record = useMemo<AppBskyFeedPost.Record | undefined>(
|
||||||
() =>
|
() =>
|
||||||
AppBskyFeedPost.isRecord(post.record) &&
|
AppBskyFeedPost.isValidRecord(post.record) ? post.record : undefined,
|
||||||
AppBskyFeedPost.validateRecord(post.record).success
|
|
||||||
? post.record
|
|
||||||
: undefined,
|
|
||||||
[post],
|
[post],
|
||||||
)
|
)
|
||||||
const postShadowed = usePostShadow(post)
|
const postShadowed = usePostShadow(post)
|
||||||
|
|||||||
Reference in New Issue
Block a user