hide ability to choose function when not connected or not approved

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2026-02-18 17:26:55 +03:00
parent ad55c04525
commit 203d483a92
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
2 changed files with 22 additions and 20 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "ghost-dao-interface", "name": "ghost-dao-interface",
"private": true, "private": true,
"version": "0.5.15", "version": "0.5.16",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -157,27 +157,29 @@ const NewProposal = ({ config, address, connect, chainId }) => {
connect={connect} connect={connect}
isVertical isVertical
> >
<PrimaryButton <Box display="flex" flexDirection="column" alignItems="center">
disabled={ <PrimaryButton
proposalFunctions.length === 0 || disabled={
ghstBalance.lt(threshold) || proposalFunctions.length === 0 ||
isPending ghstBalance.lt(threshold) ||
} isPending
fullWidth }
onClick={() => submitProposal()} fullWidth
> onClick={() => submitProposal()}
{isPending ? "Submitting..." : "Submit Proposal"} >
</PrimaryButton> {isPending ? "Submitting..." : "Submit Proposal"}
</PrimaryButton>
<TertiaryButton
sx={{ maxWidth: isSemiSmallScreen ? "100%" : "350px" }}
fullWidth
disabled={isPending}
onClick={() => setIsModalOpened(true)}
>
Add New
</TertiaryButton>
</Box>
</TokenAllowanceGuard> </TokenAllowanceGuard>
</Box> </Box>
<TertiaryButton
sx={{ maxWidth: isSemiSmallScreen ? "100%" : "350px" }}
fullWidth
disabled={isPending}
onClick={() => setIsModalOpened(true)}
>
Add New
</TertiaryButton>
</Box> </Box>
</Box> </Box>
</Paper> </Paper>