mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
refactoring: account form.
refactoring: expense form. refactoring: manual journal form. refactoring: invoice form.
This commit is contained in:
@@ -1,32 +1,15 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import React from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
import { ItemFormProvider } from './ItemFormProvider';
|
||||
import DashboardCard from 'components/Dashboard/DashboardCard';
|
||||
import ItemForm from 'containers/Items/ItemForm';
|
||||
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
/**
|
||||
* Item form page.
|
||||
*/
|
||||
function ItemFormPage({
|
||||
// #withDashboardActions
|
||||
setDashboardBackLink
|
||||
}) {
|
||||
export default function ItemFormPage() {
|
||||
const { id } = useParams();
|
||||
|
||||
useEffect(() => {
|
||||
// Show the back link on dashboard topbar.
|
||||
setDashboardBackLink(true);
|
||||
|
||||
return () => {
|
||||
// Hide the back link on dashboard topbar.
|
||||
setDashboardBackLink(false);
|
||||
};
|
||||
}, [setDashboardBackLink]);
|
||||
|
||||
return (
|
||||
<ItemFormProvider itemId={id}>
|
||||
@@ -35,8 +18,4 @@ function ItemFormPage({
|
||||
</DashboardCard>
|
||||
</ItemFormProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withDashboardActions,
|
||||
)(ItemFormPage);
|
||||
}
|
||||
Reference in New Issue
Block a user