fix: project card settings links
This commit is contained in:
parent
a8d93732ce
commit
096fd04a22
@ -53,6 +53,16 @@ export const ProjectCard = ({
|
|||||||
navigate(`projects/${project.id}`);
|
navigate(`projects/${project.id}`);
|
||||||
}, [project.id, navigate]);
|
}, [project.id, navigate]);
|
||||||
|
|
||||||
|
const navigateToSettingsOnClick = useCallback(
|
||||||
|
(
|
||||||
|
e: React.MouseEvent<HTMLLIElement> | React.MouseEvent<HTMLButtonElement>,
|
||||||
|
) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
navigate(`projects/${project.id}/settings`);
|
||||||
|
},
|
||||||
|
[project.id, navigate],
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
{...props}
|
{...props}
|
||||||
@ -92,8 +102,15 @@ export const ProjectCard = ({
|
|||||||
</Button>
|
</Button>
|
||||||
</MenuHandler>
|
</MenuHandler>
|
||||||
<MenuList>
|
<MenuList>
|
||||||
<MenuItem>Project settings</MenuItem>
|
<MenuItem onClick={navigateToSettingsOnClick}>
|
||||||
<MenuItem className="text-red-500">Delete project</MenuItem>
|
Project settings
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
className="text-red-500"
|
||||||
|
onClick={navigateToSettingsOnClick}
|
||||||
|
>
|
||||||
|
Delete project
|
||||||
|
</MenuItem>
|
||||||
</MenuList>
|
</MenuList>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user