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, 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>

View File

@@ -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,
}); });
}; };