fix(expense drawer): expense drawer.

This commit is contained in:
elforjani3
2021-04-28 20:37:44 +02:00
parent 8b7b800834
commit 1fbfd7693f
3 changed files with 3 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
import React from 'react';
import { useExpense } from 'hooks/query';
import DashboardInsider from 'components/Dashboard/DashboardInsider';
import { DrawerHeaderContent, DashboardInsider } from 'components';
const ExpenseDrawerDrawerContext = React.createContext();

View File

@@ -1,7 +1,6 @@
import React, { lazy } from 'react';
import { Drawer, DrawerSuspense } from 'components';
import withDrawers from 'containers/Drawer/withDrawers';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import { compose } from 'utils';
@@ -16,16 +15,9 @@ function ExpenseDrawer({
//#withDrawer
isOpen,
payload: { expenseId, title },
closeDrawer,
}) {
// Handle close drawer.
const handleDrawerClose = () => {
closeDrawer(name);
};
return (
<Drawer isOpen={isOpen} title={title} isClose={handleDrawerClose}>
<Drawer isOpen={isOpen} name={name} title={'Expense'}>
<DrawerSuspense>
<ExpenseDrawerContent expenseId={expenseId} />
</DrawerSuspense>
@@ -33,4 +25,4 @@ function ExpenseDrawer({
);
}
export default compose(withDrawers(), withDrawerActions)(ExpenseDrawer);
export default compose(withDrawers())(ExpenseDrawer);

View File

@@ -75,7 +75,6 @@ function ExpensesDataTable({
const handleViewDetailExpense = ({ id }) => {
openDrawer('expense-drawer', {
expenseId: id,
title: `Expense`,
});
};