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

frontend: MainInfoSection: Correctly handle null backLink #2040

Closed
wants to merge 1 commit into from

Conversation

skoeva
Copy link
Contributor

@skoeva skoeva commented Jun 14, 2024

This fix explicitly handles the null case in getBackLink() to ensure that no back button will be shown, as defined in MainInfoSectionProps.

Fixes: #2033

Testing

  • Go to frontend/src/components/crd/Details.tsx and set backLink to null in the MainInfoSection component
  • Open a cluster in Headlamp (npm start) and navigate to the Custom Resources page
  • Click on a CRD and ensure that the back button does not appear on the CRD page

This fix explicitly handles the null case in getBackLink() to ensure
that no back button will be shown, as defined in MainInfoSectionProps.

Fixes: #2033

Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
@skoeva skoeva self-assigned this Jun 14, 2024
@skoeva skoeva marked this pull request as ready for review June 14, 2024 14:55
@skoeva skoeva requested a review from joaquimrocha June 14, 2024 15:05
@joaquimrocha
Copy link
Collaborator

Closing for reopening the previous PR, since we shouldn't close PRs due to git conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting BackLink to null does not work
2 participants