fix: project details.

This commit is contained in:
elforjani13
2022-06-13 17:55:52 +02:00
parent 051681e6f3
commit 4b992c4bb4
2 changed files with 5 additions and 5 deletions

View File

@@ -17,12 +17,12 @@ function ProjectTabs({
changePageTitle,
}) {
const {
state: { original },
state: { name },
} = useLocation();
React.useEffect(() => {
changePageTitle(original.name);
}, [changePageTitle, original]);
changePageTitle(name);
}, [changePageTitle, name]);
return (
<ProjectDetailProvider>

View File

@@ -53,7 +53,7 @@ function ProjectsDataTable({
// Handle cell click.
const handleCellClick = ({ row: { original } }) => {
return history.push(`/projects/${original?.id}/details`, {
original,
name: original.name,
});
};
@@ -76,7 +76,7 @@ function ProjectsDataTable({
// Handle view detail project.
const handleViewDetailProject = (project) => {
return history.push(`/projects/${project.id}/details`, {
original: project.name,
name: project.name,
});
};