mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
refactoring: drawers suspense.
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import React from 'react';
|
||||
import DrawerTemplate from 'containers/Drawers/DrawerTemplate';
|
||||
import PaperTemplate from 'containers/Drawers/PaperTemplate/PaperTemplate';
|
||||
import React, { lazy } from 'react';
|
||||
import withDrawers from 'containers/Drawer/withDrawers';
|
||||
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||
|
||||
import { Drawer, DrawerSuspense } from 'components';
|
||||
import { compose } from 'utils';
|
||||
|
||||
const EstimateDrawerContent = lazy(() =>
|
||||
import('containers/Drawers/PaperTemplate/PaperTemplate'),
|
||||
);
|
||||
|
||||
function EstimateDrawer({
|
||||
name,
|
||||
//#withDrawer
|
||||
@@ -18,12 +21,12 @@ function EstimateDrawer({
|
||||
const handleDrawerClose = () => {
|
||||
closeDrawer(name);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<DrawerTemplate isOpen={isOpen} isClose={handleDrawerClose}>
|
||||
<PaperTemplate />
|
||||
</DrawerTemplate>
|
||||
<Drawer isOpen={isOpen} isClose={handleDrawerClose}>
|
||||
<DrawerSuspense>
|
||||
<EstimateDrawerContent />
|
||||
</DrawerSuspense>
|
||||
</Drawer>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user