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 duplicate network calls on index page #2085

Merged
merged 3 commits into from
Feb 5, 2023

Conversation

fleshgolem
Copy link
Contributor

What type of PR is this?

  • bug

What this PR does / why we need it:

The index page (Recent Recipes) would always load the recipes itself and then the contained RecipeCardSection would also trigger another recipe load (which just gets ignored). That second one is of course just wasteful, but the hook is needed for all other pages, so I added a prop to just skip it in this particular case

I also modified the initial recipe loads, so that the foods only get loaded on search pages, since they are not needed anywhere else and having them added takes considerably longer

Which issue(s) this PR fixes:

Issue #2063

Testing

Ran tests, looked at all the different recipe pages

Release Notes

NONE

@fleshgolem fleshgolem changed the title Fix/issue#2063 Fix duplicate network calls on index page Jan 31, 2023
@hay-kot hay-kot merged commit f4b8198 into mealie-recipes:mealie-next Feb 5, 2023
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