diff --git a/apps/web/src/views/Voting/CreateProposal/index.tsx b/apps/web/src/views/Voting/CreateProposal/index.tsx index c4fde6dc8d7ee..5e954460e669f 100644 --- a/apps/web/src/views/Voting/CreateProposal/index.tsx +++ b/apps/web/src/views/Voting/CreateProposal/index.tsx @@ -1,4 +1,4 @@ -import { Suspense, useEffect } from 'react' +import { Suspense, useEffect, useMemo } from 'react' import { Controller, useFieldArray, useForm } from 'react-hook-form' import { useTranslation } from '@pancakeswap/localization' @@ -66,7 +66,7 @@ const CreateProposal = () => { const { data: signer } = useWalletClient() const initialBlock = useInitialBlock() const { delay, period } = space?.voting || {} - const created = Math.floor(Date.now() / 1000) // current timestamp in seconds + const created = useMemo(() => Math.floor(Date.now() / 1000), []) // current timestamp in seconds const { push } = useRouter() const { @@ -214,7 +214,7 @@ const CreateProposal = () => { { {t('Voting Power')} - {isLoading ? '-' : total ?? 0} {isLoading ? '-' : total ?? 0} {votingPowerTooltipVisible && votingPowerTooltip}