mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: fix items list datatable.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
import { ItemFormProvider } from './ItemFormProvider';
|
||||
@@ -12,8 +12,21 @@ import { compose } from 'utils';
|
||||
/**
|
||||
* Item form page.
|
||||
*/
|
||||
function ItemFormPage() {
|
||||
function ItemFormPage({
|
||||
// #withDashboardActions
|
||||
setDashboardBackLink
|
||||
}) {
|
||||
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}>
|
||||
@@ -24,4 +37,6 @@ function ItemFormPage() {
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(withDashboardActions)(ItemFormPage);
|
||||
export default compose(
|
||||
withDashboardActions,
|
||||
)(ItemFormPage);
|
||||
|
||||
Reference in New Issue
Block a user