Skip to content

Commit

Permalink
Fix proposal off-chain
Browse files Browse the repository at this point in the history
Signed-off-by: Manank Patni <[email protected]>
  • Loading branch information
Man-Jain committed Oct 23, 2023
1 parent 8498867 commit a789cf3
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions src/modules/explorer/components/ProposalActionsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ export const ProposalActionsDialog: React.FC<Props> = ({ open, handleClose }) =>
const liteDAOId = data?.liteDAOData?._id
const shouldDisable = useIsProposalButtonDisabled(daoId)
const { network, account } = useTezos()
const isMember = useIsMember(network, data?.liteDAOData?.tokenAddress || "", account)

const handleOpenCustomProposalModal = (key: ProposalAction) => {
setProposalAction(key)
Expand Down Expand Up @@ -171,36 +170,20 @@ export const ProposalActionsDialog: React.FC<Props> = ({ open, handleClose }) =>
<Grid key={index} item xs={isMobileSmall ? 12 : 4}>
<OptionContainer
onClick={() =>
elem.id === "off-chain" && isMember
elem.id === "off-chain"
? handleLiteProposal()
: elem.id === "off-chain" && !isMember
? null
: !shouldDisable
? elem.isLambda
? handleOpenCustomProposalModal(elem.id)
: handleOpenSupportedExecuteProposalModal(elem.id)
: null
}
>
<ActionText
color={
shouldDisable && elem.id !== "off-chain"
? "textSecondary"
: elem.id === "off-chain" && !isMember
? "textSecondary"
: "textPrimary"
}
>
<ActionText color={shouldDisable && elem.id !== "off-chain" ? "textSecondary" : "textPrimary"}>
{elem.name}
</ActionText>
<ActionDescriptionText
color={
shouldDisable && elem.id !== "off-chain"
? "textSecondary"
: elem.id === "off-chain" && !isMember
? "textSecondary"
: "textPrimary"
}
color={shouldDisable && elem.id !== "off-chain" ? "textSecondary" : "textPrimary"}
>
{elem.description}{" "}
</ActionDescriptionText>
Expand Down

0 comments on commit a789cf3

Please sign in to comment.