Skip to content

Commit

Permalink
retain fellowship members, #5271
Browse files Browse the repository at this point in the history
  • Loading branch information
leocs2417 committed Jan 17, 2025
1 parent 200fb04 commit 6543a4c
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import RankField from "next-common/components/popup/fields/rankField";
import Popup from "next-common/components/popup/wrapper/Popup";
import { usePopupParams } from "next-common/components/popupWithSigner/context";
import useAddressComboField from "next-common/components/preImages/createPreimagePopup/fields/useAddressComboField";
import useFellowshipMemberFiled from "next-common/components/preImages/createPreimagePopup/fields/useFellowshipMemberFiled";
import useFellowshipCoreMembers from "next-common/hooks/fellowship/core/useFellowshipCoreMembers";
import AdvanceSettings from "../common/advanceSettings";
import useEnactmentBlocksField from "../common/useEnactmentBlocksField";
Expand All @@ -12,12 +12,17 @@ import { ActiveReferendaProvider } from "next-common/context/activeReferenda";
import { useReferendaFellowshipPallet } from "next-common/context/collectives/collectives";
import useRelatedRetentionReferenda from "next-common/hooks/fellowship/useRelatedRetentionReferenda";
import { ReferendaWarningMessage } from "./common";
import { NotAvailableMemberPrompt } from "./createFellowshipCoreMemberPromotePopup";

function NewFellowshipCoreMemberRetainReferendumInnerPopupImpl() {
const { members } = useFellowshipCoreMembers();

const { onClose } = usePopupParams();
const { value: who, component: whoField } = useAddressComboField({
const {
value: who,
isAvailableMember,
component: whoField,
} = useFellowshipMemberFiled({
title: "Who",
});
const { value: enactment, component: enactmentField } =
Expand All @@ -39,10 +44,11 @@ function NewFellowshipCoreMemberRetainReferendumInnerPopupImpl() {
isLoading={isLoading}
relatedReferenda={relatedReferenda}
/>
{!isAvailableMember && <NotAvailableMemberPrompt />}
<AdvanceSettings>{enactmentField}</AdvanceSettings>
<div className="flex justify-end">
<CreateFellowshipCoreMemberProposalSubmitButton
disabled={isLoading || isReferendaExisted}
disabled={isLoading || isReferendaExisted || !isAvailableMember}
who={who}
enactment={enactment}
rank={atRank}
Expand Down

0 comments on commit 6543a4c

Please sign in to comment.