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

coral-web: fix deployments dropdown check #158

Merged
merged 1 commit into from
May 28, 2024

Conversation

wujessica
Copy link
Contributor

@wujessica wujessica commented May 28, 2024

Description:

Adds a missing check for deployment being undefined with the DeploymentsDropdown.tsx. In reality, this should never be undefined since the dropdown is filled in by the allDeployments endpoint.

AI Description

This pull request makes changes to the DeploymentsDropdown component in the src/interfaces/coral_web/src/components/DeploymentsDropdown.tsx file.

Summary

The pull request removes the useState import from 'react' and updates the condition check inside the DeploymentsDropdown functional component.

Changes

  • Removed useState from imports.
  • Updated the condition check inside the DeploymentsDropdown function to include an additional check for deployment. Now, it checks if deployment exists and if it's not available (!deployment.is_available).

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@8560571). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #158   +/-   ##
=======================================
  Coverage        ?   88.57%           
=======================================
  Files           ?      115           
  Lines           ?     3633           
  Branches        ?        0           
=======================================
  Hits            ?     3218           
  Misses          ?      415           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wujessica wujessica merged commit f96ef06 into main May 28, 2024
2 checks passed
@wujessica wujessica deleted the jw/CNV-1976-fix-deployments-dropdown-error branch May 28, 2024 17:50
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.

3 participants