Skip to content

Conversation

@brettkolodny
Copy link
Contributor

Change the render logic so that we always show an error message if the error is available

Copy link
Member

@aslilac aslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I often like to do

if (isLoading) {
  return <Loader />
}

if (!data) {
  return <ErrorAlert error={error} />
}

because ErrorAlert can appropriately handle getting undefined, and if it's not loading but we also don't have data, then something did go wrong.

This looks fine tho!

@brettkolodny brettkolodny merged commit 570e42b into main Feb 19, 2025
30 checks passed
@brettkolodny brettkolodny deleted the brett/fix-health-render-logic branch February 19, 2025 20:09
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants