Skip to content

Commit

Permalink
fix: change query used to enable quote link on my account page
Browse files Browse the repository at this point in the history
  • Loading branch information
enzomerca committed Aug 23, 2024
1 parent 5425190 commit 9055277
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion react/B2BQuotesLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const B2BQuotesLink: FunctionComponent<Props> = ({ render }) => {
return
}

if (data.getUserByEmail[0]?.id) {
if (data.getQuoteEnabledForUser) {
setShow(true)
}
}, [data, userEmail, sessionResponse])
Expand Down
11 changes: 1 addition & 10 deletions react/graphql/checkPermissions.graphql
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
query CheckPermissions($email: String!) {
getUserByEmail(email: $email)
@context(provider: "vtex.storefront-permissions") {
id
roleId
userId
clId
orgId
costId
canImpersonate
}
getQuoteEnabledForUser(email: $email)
}

0 comments on commit 9055277

Please sign in to comment.