BlueWallet/navigation/LazyLoadSendDetailsStack.tsx
Marcos Rodriguez Velez 9aa5dd5d59
REF: Confirm to TSX
2024-05-22 12:08:49 -04:00

61 lines
2.0 KiB
TypeScript

import React, { lazy, Suspense } from 'react';
import { LazyLoadingIndicator } from './LazyLoadingIndicator';
const SendDetails = lazy(() => import('../screen/send/details'));
const Confirm = lazy(() => import('../screen/send/Confirm'));
const PsbtWithHardwareWallet = lazy(() => import('../screen/send/psbtWithHardwareWallet'));
const CreateTransaction = lazy(() => import('../screen/send/create'));
const PsbtMultisig = lazy(() => import('../screen/send/psbtMultisig'));
const PsbtMultisigQRCode = lazy(() => import('../screen/send/psbtMultisigQRCode'));
const Success = lazy(() => import('../screen/send/success'));
const SelectWallet = lazy(() => import('../screen/wallets/selectWallet'));
const CoinControl = lazy(() => import('../screen/send/coinControl'));
// Export each component with its lazy loader and optional configurations
export const SendDetailsComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<SendDetails />
</Suspense>
);
export const ConfirmComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<Confirm />
</Suspense>
);
export const PsbtWithHardwareWalletComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<PsbtWithHardwareWallet />
</Suspense>
);
export const CreateTransactionComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<CreateTransaction />
</Suspense>
);
export const PsbtMultisigComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<PsbtMultisig />
</Suspense>
);
export const PsbtMultisigQRCodeComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<PsbtMultisigQRCode />
</Suspense>
);
export const SuccessComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<Success />
</Suspense>
);
export const SelectWalletComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<SelectWallet />
</Suspense>
);
export const CoinControlComponent = () => (
<Suspense fallback={<LazyLoadingIndicator />}>
<CoinControl />
</Suspense>
);