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,6 +102,7 @@ const Project = () => {
|
||||
id: currentUser?.id!,
|
||||
},
|
||||
onCompleted({ getAllProjectsByClientId }) {
|
||||
if (getAllProjectsByClientId.length > 0)
|
||||
history.push(`/project/${getAllProjectsByClientId[0].id}`);
|
||||
},
|
||||
fetchPolicy: 'network-only',
|
||||
@@ -112,6 +113,7 @@ const Project = () => {
|
||||
GetAllUsersQueryVariables
|
||||
>(GET_ALL_PROJECTS, {
|
||||
onCompleted({ getAllProjects }) {
|
||||
if (getAllProjects.length > 0)
|
||||
history.push(`/project/${getAllProjects[0].id}`);
|
||||
},
|
||||
fetchPolicy: 'network-only',
|
||||
|
||||
Reference in New Issue
Block a user