diff --git a/src/pages/common/components/DiscussionFeedCard/utils/checkIsRemoveDiscussionAllowed.ts b/src/pages/common/components/DiscussionFeedCard/utils/checkIsRemoveDiscussionAllowed.ts index 82486bf9f4..2edd051f8f 100644 --- a/src/pages/common/components/DiscussionFeedCard/utils/checkIsRemoveDiscussionAllowed.ts +++ b/src/pages/common/components/DiscussionFeedCard/utils/checkIsRemoveDiscussionAllowed.ts @@ -1,6 +1,6 @@ import { GovernanceActions } from "@/shared/constants"; import { PredefinedTypes } from "@/shared/models"; -import { checkIsCountdownState, hasPermission } from "@/shared/utils"; +import { hasPermission } from "@/shared/utils"; import { GetAllowedItemsOptions } from "../../FeedItem"; export function checkIsRemoveDiscussionAllowed( @@ -27,17 +27,11 @@ export function checkIsRemoveDiscussionAllowed( return hasPermissionToRemoveDiscussion; } - const { proposalState } = options; - const hasPermissionToRemoveProposal = + return ( hasPermission({ commonMember: options.commonMember, governance: { circles }, key: GovernanceActions.HIDE_OR_UNHIDE_PROPOSAL, - }) || isDiscussionOwner; - - return Boolean( - proposalState && - checkIsCountdownState({ state: proposalState }) && - hasPermissionToRemoveProposal, + }) || isDiscussionOwner ); } diff --git a/src/pages/common/components/FeedItem/types.ts b/src/pages/common/components/FeedItem/types.ts index 7ceb05e209..35cfcb4bc2 100644 --- a/src/pages/common/components/FeedItem/types.ts +++ b/src/pages/common/components/FeedItem/types.ts @@ -7,7 +7,6 @@ import { Discussion, CommonFeedType, CommonFeedObjectUserUnique, - ProposalState, } from "@/shared/models"; import { FeedItemMenuItem } from "./constants"; @@ -22,7 +21,6 @@ export interface GetAllowedItemsOptions { discussion?: Discussion | null; governanceCircles?: Circles; feedItem?: CommonFeed; - proposalState?: ProposalState; commonMember?: CommonMember | null; feedItemFollow: FeedItemFollowState; getNonAllowedItems?: GetNonAllowedItemsOptions; diff --git a/src/pages/common/components/ProposalFeedCard/ProposalFeedCard.tsx b/src/pages/common/components/ProposalFeedCard/ProposalFeedCard.tsx index d675f33e72..a1ec3693a3 100644 --- a/src/pages/common/components/ProposalFeedCard/ProposalFeedCard.tsx +++ b/src/pages/common/components/ProposalFeedCard/ProposalFeedCard.tsx @@ -186,7 +186,6 @@ const ProposalFeedCard = forwardRef( feedItem: item, discussion, governanceCircles, - proposalState: proposal?.state, commonMember, feedItemFollow, getNonAllowedItems,