mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-06 02:15:22 -05:00
30 lines
917 B
JavaScript
30 lines
917 B
JavaScript
|
|
import ViewRecipe from "@/pages/Recipe/ViewRecipe";
|
||
|
|
import NewRecipe from "@/pages/Recipe/NewRecipe";
|
||
|
|
import CustomPage from "@/pages/Recipes/CustomPage";
|
||
|
|
import AllRecipes from "@/pages/Recipes/AllRecipes";
|
||
|
|
import CategoryPage from "@/pages/Recipes/CategoryPage";
|
||
|
|
import TagPage from "@/pages/Recipes/TagPage";
|
||
|
|
import { api } from "@/api";
|
||
|
|
|
||
|
|
export const recipeRoutes = [
|
||
|
|
// Recipes
|
||
|
|
{ path: "/recipes/all", component: AllRecipes },
|
||
|
|
{ path: "/recipes/tag/:tag", component: TagPage },
|
||
|
|
{ path: "/recipes/category/:category", component: CategoryPage },
|
||
|
|
// Misc
|
||
|
|
{ path: "/new/", component: NewRecipe },
|
||
|
|
{ path: "/pages/:customPage", component: CustomPage },
|
||
|
|
|
||
|
|
// Recipe Page
|
||
|
|
{
|
||
|
|
path: "/recipe/:recipe",
|
||
|
|
component: ViewRecipe,
|
||
|
|
meta: {
|
||
|
|
title: async route => {
|
||
|
|
const recipe = await api.recipes.requestDetails(route.params.recipe);
|
||
|
|
return recipe.name;
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
];
|