Fix in DisplayUserProjects component

This commit is contained in:
Davenludd 2024-04-02 11:37:53 +02:00
parent c1f49915ba
commit 6dfa917cf0

View file

@ -27,7 +27,10 @@ function DisplayUserProject(): JSX.Element {
const response = await api.checkIfProjectManager(projectName, token);
console.log(response.data);
if (response.success) {
if (response.data === true) {
if (
(response.data as unknown as { isProjectManager: boolean })
.isProjectManager
) {
navigate(`/PMProjectPage/${projectName}`);
} else {
navigate(`/project/${projectName}`);