fix(edit menu): read canonical author bans

This commit is contained in:
Tommaso Casaburi
2026-06-07 22:46:20 +07:00
parent aa5a985201
commit 38d18b141e
2 changed files with 30 additions and 1 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ const EditMenu = ({ post }: { post: Comment }) => {
const communityAddress = getCommentCommunityAddress(resolvedPost);
const archived = isCommentArchived(resolvedPost);
const authorDisplayName = resolvedPost?.author?.displayName;
const modBanExpiresAt = resolvedPost?.commentModeration?.author?.banExpiresAt;
const modBanExpiresAt = resolvedPost?.author?.community?.banExpiresAt ?? resolvedPost?.commentModeration?.author?.banExpiresAt;
const purged = resolvedPost?.commentModeration?.purged ?? false;
const [isEditMenuOpen, setIsEditMenuOpen] = useState(false);
const [isContentEditorOpen, setIsContentEditorOpen] = useState(false);