BlueWallet/navigation/LazyLoadAddWalletStack.tsx

83 lines
2.5 KiB
TypeScript
Raw Normal View History

2024-05-05 22:33:06 +02:00
import React, { lazy, Suspense } from 'react';
2024-05-20 11:54:13 +02:00
2024-05-09 02:32:37 +02:00
import { LazyLoadingIndicator } from './LazyLoadingIndicator';
2024-05-05 22:33:06 +02:00
// Define lazy imports
const WalletsAdd = lazy(() => import('../screen/wallets/Add'));
const ImportCustomDerivationPath = lazy(() => import('../screen/wallets/importCustomDerivationPath'));
2024-10-05 16:13:46 +02:00
const ImportWalletDiscovery = lazy(() => import('../screen/wallets/ImportWalletDiscovery'));
2024-05-06 05:11:29 +02:00
const ImportSpeed = lazy(() => import('../screen/wallets/importSpeed'));
2024-05-06 00:37:01 +02:00
const ImportWallet = lazy(() => import('../screen/wallets/import'));
2024-05-05 22:33:06 +02:00
const PleaseBackup = lazy(() => import('../screen/wallets/PleaseBackup'));
const PleaseBackupLNDHub = lazy(() => import('../screen/wallets/pleaseBackupLNDHub'));
2024-06-01 15:48:22 +02:00
const ProvideEntropy = lazy(() => import('../screen/wallets/ProvideEntropy'));
2024-07-14 16:25:35 +02:00
const WalletsAddMultisig = lazy(() => import('../screen/wallets/WalletsAddMultisig'));
2024-05-05 22:33:06 +02:00
const WalletsAddMultisigStep2 = lazy(() => import('../screen/wallets/addMultisigStep2'));
const WalletsAddMultisigHelp = lazy(() => import('../screen/wallets/addMultisigHelp'));
export const AddComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-05 22:33:06 +02:00
<WalletsAdd />
</Suspense>
);
2024-05-06 00:37:01 +02:00
export const ImportWalletDiscoveryComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-06 00:37:01 +02:00
<ImportWalletDiscovery />
</Suspense>
);
2024-05-05 22:33:06 +02:00
export const ImportCustomDerivationPathComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-05 22:33:06 +02:00
<ImportCustomDerivationPath />
</Suspense>
);
2024-05-06 00:37:01 +02:00
export const ImportWalletComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-06 00:37:01 +02:00
<ImportWallet />
2024-05-05 22:33:06 +02:00
</Suspense>
);
2024-05-06 05:11:29 +02:00
export const ImportSpeedComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-06 05:11:29 +02:00
<ImportSpeed />
</Suspense>
);
2024-05-05 22:33:06 +02:00
export const PleaseBackupComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-05 22:33:06 +02:00
<PleaseBackup />
</Suspense>
);
export const PleaseBackupLNDHubComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-05 22:33:06 +02:00
<PleaseBackupLNDHub />
</Suspense>
);
export const ProvideEntropyComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-05 22:33:06 +02:00
<ProvideEntropy />
</Suspense>
);
export const WalletsAddMultisigComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-05 22:33:06 +02:00
<WalletsAddMultisig />
</Suspense>
);
export const WalletsAddMultisigStep2Component = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-05 22:33:06 +02:00
<WalletsAddMultisigStep2 />
</Suspense>
);
export const WalletsAddMultisigHelpComponent = () => (
2024-05-09 02:32:37 +02:00
<Suspense fallback={<LazyLoadingIndicator />}>
2024-05-05 22:33:06 +02:00
<WalletsAddMultisigHelp />
</Suspense>
);