Skip to content

Commit

Permalink
fix: wrapps err in useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajpiar committed Oct 25, 2024
1 parent 07a4c3f commit de388ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
Binary file removed public/images/Early-Adopters-Collection-Cover.png
Binary file not shown.
12 changes: 0 additions & 12 deletions src/app/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,3 @@ export const Login = () => {
</div>
)
}

const Header = () => (
<header className="absolute top-9 left-8">
<Image
src="/images/wordmark.svg"
alt="Logo"
width={0}
height={0}
style={{ width: '96px', height: 'auto' }}
/>
</header>
)
11 changes: 7 additions & 4 deletions src/app/proposals/create/RemoveBuilderProposalForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ export const RemoveBuilderProposalForm: FC = () => {
const { isLoading: isVotingPowerLoading, canCreateProposal } = useVotingPower()
const { setMessage } = useAlertContext()
const { onRemoveBuilderProposal, isPublishing, error } = useRemoveBuilderProposal()
if (error) {
setMessage(TX_MESSAGES.proposal.error)
console.error('🐛 Error writing to contract:', error)
}

const [activeStep, setActiveStep] = useState('proposal')

Expand Down Expand Up @@ -90,6 +86,13 @@ export const RemoveBuilderProposalForm: FC = () => {
}
}

useEffect(() => {
if (error) {
setMessage(TX_MESSAGES.proposal.error)
console.error('🐛 Error writing to contract:', error)
}
}, [error, setMessage])

useEffect(() => {
if (!isVotingPowerLoading && !canCreateProposal) {
router.push(`/proposals/${proposalId}`)
Expand Down

0 comments on commit de388ab

Please sign in to comment.