mealie/frontend/pages/index.vue
Sören f4b819899d
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
2023-02-05 09:52:49 -09:00

27 lines
731 B
Vue

<template>
<v-container>
<RecipeCardSection
:icon="$globals.icons.primary"
:title="$t('general.recent')"
:recipes="recentRecipes"
:skip-load="true"
></RecipeCardSection>
</v-container>
</template>
<script lang="ts">
import { defineComponent } from "@nuxtjs/composition-api";
import RecipeCardSection from "~/components/Domain/Recipe/RecipeCardSection.vue";
import { useRecipes, recentRecipes } from "~/composables/recipes";
import { useStaticRoutes } from "~/composables/api";
export default defineComponent({
components: { RecipeCardSection },
setup() {
const { assignSorted } = useRecipes(false);
useStaticRoutes();
return { recentRecipes, assignSorted };
},
});
</script>