Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: skip graphql query if parameter is null #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Skip graphl query if parameter is null

## [1.6.5] - 2024-09-26
### Fixed
Expand Down
1 change: 1 addition & 0 deletions react/B2BQuotesLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@

const B2BQuotesLink: FunctionComponent<Props> = ({ render }) => {
const { formatMessage } = useIntl()
const sessionResponse: any = useSessionResponse()

Check warning on line 17 in react/B2BQuotesLink.tsx

View workflow job for this annotation

GitHub Actions / QE / Lint Node.js

Unexpected any. Specify a different type
const userEmail = sessionResponse?.namespaces?.profile?.email?.value

const [show, setShow] = useState(false)

const { data } = useQuery(CHECK_PERMISSIONS, {
variables: { email: userEmail },
skip: !userEmail,
})

useEffect(() => {
Expand All @@ -43,7 +44,7 @@

type Props = {
render: (links: Array<{ name: string; path: string }>) => ReactElement
intl: any

Check warning on line 47 in react/B2BQuotesLink.tsx

View workflow job for this annotation

GitHub Actions / QE / Lint Node.js

Unexpected any. Specify a different type
}

export default B2BQuotesLink
Loading