mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
fix: project details.
This commit is contained in:
@@ -17,12 +17,12 @@ function ProjectTabs({
|
|||||||
changePageTitle,
|
changePageTitle,
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
state: { original },
|
state: { name },
|
||||||
} = useLocation();
|
} = useLocation();
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
changePageTitle(original.name);
|
changePageTitle(name);
|
||||||
}, [changePageTitle, original]);
|
}, [changePageTitle, name]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProjectDetailProvider>
|
<ProjectDetailProvider>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ function ProjectsDataTable({
|
|||||||
// Handle cell click.
|
// Handle cell click.
|
||||||
const handleCellClick = ({ row: { original } }) => {
|
const handleCellClick = ({ row: { original } }) => {
|
||||||
return history.push(`/projects/${original?.id}/details`, {
|
return history.push(`/projects/${original?.id}/details`, {
|
||||||
original,
|
name: original.name,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ function ProjectsDataTable({
|
|||||||
// Handle view detail project.
|
// Handle view detail project.
|
||||||
const handleViewDetailProject = (project) => {
|
const handleViewDetailProject = (project) => {
|
||||||
return history.push(`/projects/${project.id}/details`, {
|
return history.push(`/projects/${project.id}/details`, {
|
||||||
original: project.name,
|
name: project.name,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user