fix: Suspense the lazy loaded components in banking pages

This commit is contained in:
Ahmed Bouhuolia
2024-09-03 17:24:11 +02:00
parent 0c6f23e770
commit 9add716395
4 changed files with 35 additions and 16 deletions

View File

@@ -0,0 +1,20 @@
// @ts-nocheck
import { Suspense, lazy } from 'react';
import { Spinner } from '@blueprintjs/core';
import { AppContentShell } from '@/components/AppShell';
const CategorizeTransactionAside = lazy(() =>
import('../CategorizeTransactionAside/CategorizeTransactionAside').then(
(module) => ({ default: module.CategorizeTransactionAside }),
),
);
export function AccountTransactionsAside() {
return (
<AppContentShell.Aside>
<Suspense fallback={<Spinner size={20} />}>
<CategorizeTransactionAside />
</Suspense>
</AppContentShell.Aside>
);
}