Skip to content

Commit

Permalink
feat(dcellar-web-ui): update send page loading style
Browse files Browse the repository at this point in the history
  • Loading branch information
aiden-cao committed Oct 11, 2023
1 parent adb0722 commit 5deef4b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions apps/dcellar-web-ui/src/modules/wallet/Send/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { useSettlementFee } from '@/hooks/useSettlementFee';
import { removeTrailingSlash } from '@/utils/string';
import { InternalRoutePaths } from '@/utils/constant';
import styled from '@emotion/styled';
import { Loading as PageLoading } from '@/components/common/Loading';

export type TxType =
| 'withdraw_from_payment_account'
Expand Down Expand Up @@ -108,13 +109,7 @@ export const Send = memo<SendProps>(function Send() {
mode: 'all',
});
useEffect(() => {
if (
isLoadingPaymentAccounts ||
isEmpty(ownerAccount) ||
initFormRef.current ||
initFormRef.current
)
return;
if (isLoadingPaymentAccounts || isEmpty(ownerAccount) || initFormRef.current) return;
if (isEmpty(paymentAccounts)) {
initFormRef.current = true;
return;
Expand Down Expand Up @@ -215,7 +210,7 @@ export const Send = memo<SendProps>(function Send() {
},
connector,
);
txCallback({ res: pRes, error: pError, freshAddress: [toAccount.address]});
txCallback({ res: pRes, error: pError, freshAddress: [toAccount.address] });
break;
case 'withdraw_from_payment_account':
onOpen();
Expand Down Expand Up @@ -310,7 +305,7 @@ export const Send = memo<SendProps>(function Send() {
if (!initFormRef.current)
return (
<Flex justifyContent="center" my={50}>
<Loading />
<PageLoading />
</Flex>
);

Expand Down

0 comments on commit 5deef4b

Please sign in to comment.