mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
prevent type error
This commit is contained in:
@@ -57,7 +57,7 @@ const PostInfo = ({ post, postReplyCount = 0, roles, isHidden }: PostProps) => {
|
|||||||
const replies = useReplies(post);
|
const replies = useReplies(post);
|
||||||
const { address, shortAddress } = author || {};
|
const { address, shortAddress } = author || {};
|
||||||
const displayName = author?.displayName?.trim();
|
const displayName = author?.displayName?.trim();
|
||||||
const authorRole = roles?.[address]?.role.replace('moderator', 'mod');
|
const authorRole = roles?.[address]?.role?.replace('moderator', 'mod');
|
||||||
const stateString = useStateString(post);
|
const stateString = useStateString(post);
|
||||||
const isReply = parentCid;
|
const isReply = parentCid;
|
||||||
const { showOmittedReplies } = useShowOmittedReplies();
|
const { showOmittedReplies } = useShowOmittedReplies();
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles }: PostProps) => {
|
|||||||
const title = post?.title?.trim();
|
const title = post?.title?.trim();
|
||||||
const { address, shortAddress } = author || {};
|
const { address, shortAddress } = author || {};
|
||||||
const displayName = author?.displayName?.trim();
|
const displayName = author?.displayName?.trim();
|
||||||
const authorRole = roles?.[address]?.role.replace('moderator', 'mod');
|
const authorRole = roles?.[address]?.role?.replace('moderator', 'mod');
|
||||||
const { imageUrl: avatarImageUrl } = useAuthorAvatar({ author });
|
const { imageUrl: avatarImageUrl } = useAuthorAvatar({ author });
|
||||||
const { hideAvatars } = useAvatarVisibilityStore();
|
const { hideAvatars } = useAvatarVisibilityStore();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user