Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dcellar-web-ui): update send page loading style #205

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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