mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Fix bug in project page
This commit is contained in:
@@ -102,7 +102,8 @@ const Project = () => {
|
|||||||
id: currentUser?.id!,
|
id: currentUser?.id!,
|
||||||
},
|
},
|
||||||
onCompleted({ getAllProjectsByClientId }) {
|
onCompleted({ getAllProjectsByClientId }) {
|
||||||
history.push(`/project/${getAllProjectsByClientId[0].id}`);
|
if (getAllProjectsByClientId.length > 0)
|
||||||
|
history.push(`/project/${getAllProjectsByClientId[0].id}`);
|
||||||
},
|
},
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
});
|
});
|
||||||
@@ -112,7 +113,8 @@ const Project = () => {
|
|||||||
GetAllUsersQueryVariables
|
GetAllUsersQueryVariables
|
||||||
>(GET_ALL_PROJECTS, {
|
>(GET_ALL_PROJECTS, {
|
||||||
onCompleted({ getAllProjects }) {
|
onCompleted({ getAllProjects }) {
|
||||||
history.push(`/project/${getAllProjects[0].id}`);
|
if (getAllProjects.length > 0)
|
||||||
|
history.push(`/project/${getAllProjects[0].id}`);
|
||||||
},
|
},
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user