Fix in DisplayUserProjects component
This commit is contained in:
parent
c1f49915ba
commit
6dfa917cf0
1 changed files with 4 additions and 1 deletions
|
@ -27,7 +27,10 @@ function DisplayUserProject(): JSX.Element {
|
||||||
const response = await api.checkIfProjectManager(projectName, token);
|
const response = await api.checkIfProjectManager(projectName, token);
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
if (response.data === true) {
|
if (
|
||||||
|
(response.data as unknown as { isProjectManager: boolean })
|
||||||
|
.isProjectManager
|
||||||
|
) {
|
||||||
navigate(`/PMProjectPage/${projectName}`);
|
navigate(`/PMProjectPage/${projectName}`);
|
||||||
} else {
|
} else {
|
||||||
navigate(`/project/${projectName}`);
|
navigate(`/project/${projectName}`);
|
||||||
|
|
Loading…
Reference in a new issue