playing with navs

This commit is contained in:
vabene1111
2024-02-22 22:19:00 +01:00
parent b0e01e13bf
commit d53706bd5d
2 changed files with 59 additions and 36 deletions

View File

@@ -12,9 +12,11 @@ import RecipeSearchPage from "@/pages/RecipeSearchPage.vue";
import RecipeViewPage from "@/pages/RecipeViewPage.vue";
const routes = [
{path: '/search', component: RecipeSearchPage},
{path: '/shopping', component: ShoppingListPage},
{path: '/recipe/:id', component: RecipeViewPage, props: true},
{path: '/', redirect: '/search', name: 'index'},
{path: '/search', component: RecipeSearchPage, name: 'view_search'},
{path: '/shopping', component: ShoppingListPage, name: 'view_shopping'},
{path: '/recipe/:id', component: RecipeViewPage, name: 'view_recipe', props: true},
{path: '/recipe/edit/:id', component: RecipeViewPage, name: 'view_recipe', props: true},
]
const router = createRouter({