From 36bc097c0b47d0cc756b17d51e4265f8fea948ae Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 22 Jun 2022 12:46:27 +0100 Subject: [PATCH] state & hooks access reordering --- src/components/@shared/ButtonBuy/index.module.css | 2 +- src/components/Asset/AssetActions/Compute/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/@shared/ButtonBuy/index.module.css b/src/components/@shared/ButtonBuy/index.module.css index b89ee14f8..99516295e 100644 --- a/src/components/@shared/ButtonBuy/index.module.css +++ b/src/components/@shared/ButtonBuy/index.module.css @@ -4,7 +4,7 @@ } .actionsCenter { - margin: auto !important; + margin: auto; display: block; } diff --git a/src/components/Asset/AssetActions/Compute/index.tsx b/src/components/Asset/AssetActions/Compute/index.tsx index 18ca88dac..6176e1b4c 100644 --- a/src/components/Asset/AssetActions/Compute/index.tsx +++ b/src/components/Asset/AssetActions/Compute/index.tsx @@ -64,7 +64,9 @@ export default function Compute({ }): ReactElement { const { accountId, web3 } = useWeb3() const { getOpcFeeForToken } = useMarketMetadata() + const { poolData } = usePool() const newAbortController = useAbortController() + const newCancelToken = useCancelToken() const [isJobStarting, setIsJobStarting] = useState(false) const [error, setError] = useState() @@ -80,8 +82,6 @@ export default function Compute({ const [validOrderTx, setValidOrderTx] = useState('') const [validAlgorithmOrderTx, setValidAlgorithmOrderTx] = useState('') - const { poolData } = usePool() - const newCancelToken = useCancelToken() const [isConsumablePrice, setIsConsumablePrice] = useState(true) const [computeStatusText, setComputeStatusText] = useState('') const [computeEnv, setComputeEnv] = useState()