Skip to content

Commit

Permalink
Remove connect button
Browse files Browse the repository at this point in the history
  • Loading branch information
elboletaire committed May 28, 2024
1 parent 51f933f commit 3699590
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions src/components/Process/Aside.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Button, Card, Flex, Link, Text } from '@chakra-ui/react'
import { Box, Card, Flex, Link, Text } from '@chakra-ui/react'
import { ConnectButton } from '@rainbow-me/rainbowkit'
import { VoteButton as CVoteButton, environment, SpreadsheetAccess, VoteWeight } from '@vocdoni/chakra-components'
import { useClient, useElection } from '@vocdoni/react-providers'
Expand Down Expand Up @@ -211,38 +211,6 @@ export const VoteButton = ({ ...props }) => {
px={{ base: 3, lg2: 0 }}
{...props}
>
{census?.type !== 'spreadsheet' && !connected && (
<ConnectButton.Custom>
{({ account, chain, openConnectModal, authenticationStatus, mounted }) => {
const ready = mounted && authenticationStatus !== 'loading'
const connected =
ready && account && chain && (!authenticationStatus || authenticationStatus === 'authenticated')
return (
<Box
{...(!ready && {
'aria-hidden': true,
style: {
opacity: 0,
pointerEvents: 'none',
userSelect: 'none',
},
})}
w='full'
>
{(() => {
if (!connected) {
return (
<Button onClick={openConnectModal} w='full'>
{t('menu.connect').toString()}
</Button>
)
}
})()}
</Box>
)
}}
</ConnectButton.Custom>
)}
<Flex flexDirection='column' gap={5} w='100%'>
{census?.type === 'spreadsheet' && !connected && !isAbleToVote && <SpreadsheetAccess />}
{isAbleToVote && (
Expand Down

1 comment on commit 3699590

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.