Skip to content

Commit

Permalink
Vote again fix (#4692)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrrayz authored Dec 11, 2023
1 parent 7d92ed8 commit d9639df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BN from 'bn.js'
import React, { useCallback } from 'react'
import React from 'react'
import styled from 'styled-components'

import { BadgeStatus } from '@/common/components/BadgeStatus'
Expand Down Expand Up @@ -46,14 +46,14 @@ export const CandidateCard = ({
}: CandidateCardProps) => {
const { showModal } = useModal()
const { size } = useResponsive()
const showCandidate = useCallback(() => {
const showCandidate = () => {
if (!isPreview) {
showModal<CandidacyPreviewModalCall>({
modal: 'CandidacyPreview',
data: { id },
})
}
}, [showModal, isPreview])
}
const { isLoading: loadingStats, successful, failed } = useMemberCandidacyStats(member.id)

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { MouseEventHandler, useCallback } from 'react'
import React, { MouseEventHandler } from 'react'

import { TransactionButton } from '@/common/components/buttons/TransactionButton'
import { useModal } from '@/common/hooks/useModal'
Expand All @@ -12,13 +12,10 @@ interface VoteForCouncilButtonProps {
export const VoteForCouncilButton = ({ id, again }: VoteForCouncilButtonProps) => {
const { showModal } = useModal<VoteForCouncilModalCall>()

const vote = useCallback<MouseEventHandler<HTMLDivElement>>(
(event) => {
event.stopPropagation()
showModal<VoteForCouncilModalCall>({ modal: 'VoteForCouncil', data: { id } })
},
[showModal]
)
const vote: MouseEventHandler<HTMLDivElement> = (event) => {
event.stopPropagation()
showModal<VoteForCouncilModalCall>({ modal: 'VoteForCouncil', data: { id } })
}

return (
<TransactionButton style="primary" size="medium" onClick={vote}>
Expand Down

1 comment on commit d9639df

@vercel
Copy link

@vercel vercel bot commented on d9639df Dec 11, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

dao – ./

dao-joystream.vercel.app
dao.joystream.org
dao-git-main-joystream.vercel.app
pioneerapp.xyz

Please sign in to comment.