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

Safe Loaders #837

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Safe Loaders #837

merged 1 commit into from
Oct 19, 2024

Conversation

lowtorola
Copy link
Contributor

This fixes the issue of loaders throwing runtime errors. I added a few notes, feel free to give your thoughts on them. tyty

const loggedIn = await loginCheck(queryClient);

// Await the episode info so we can be sure that it exists
const episodeInfo = await queryClient.ensureQueryData({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm still awaiting things that I want to e.g. wait or throw to error boundary on 😎

frontend2/src/api/helpers.ts Outdated Show resolved Hide resolved
frontend2/src/api/loaders/homeIfLoggedIn.ts Show resolved Hide resolved
frontend2/src/api/helpers.ts Outdated Show resolved Hide resolved
working safe loaders
Copy link
Member

@acrantel acrantel left a comment

Choose a reason for hiding this comment

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

lgtm! :shipit:

@lowtorola lowtorola merged commit d2b8322 into main Oct 19, 2024
3 checks passed
@lowtorola lowtorola deleted the safe-loaders branch October 19, 2024 17:39
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.

2 participants