mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-30 09:43:43 -04:00
fix: duplicate network calls on index page (#2085)
* Prevent extra recipe load on index page * Prevent loading recipes with food for all components but search ones * add missing change in search page
This commit is contained in:
@@ -183,6 +183,10 @@ export default defineComponent({
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
skipLoad: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
setup(props, context) {
|
||||
const preferences = useUserSortPreferences();
|
||||
@@ -233,6 +237,9 @@ export default defineComponent({
|
||||
const { fetchMore } = useLazyRecipes();
|
||||
|
||||
onMounted(async () => {
|
||||
if (props.skipLoad) {
|
||||
return;
|
||||
}
|
||||
const newRecipes = await fetchMore(
|
||||
page.value,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user