diff --git a/src/App.vue b/src/App.vue
index 902f260..563e382 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -2,7 +2,7 @@
-
- Actions
+ Recipes
-
Meal Plan
diff --git a/src/components/ActionsPage.vue b/src/components/ActionsPage.vue
deleted file mode 100644
index e58f022..0000000
--- a/src/components/ActionsPage.vue
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/components/EditRecipePage.vue b/src/components/EditRecipePage.vue
index abc8ac0..55d9fa2 100644
--- a/src/components/EditRecipePage.vue
+++ b/src/components/EditRecipePage.vue
@@ -180,7 +180,7 @@ export default {
async deleteRecipe() {
if (confirm('Are you sure you want to delete this recipe?')) {
await data.deleteRecipe(this.recipe.id);
- this.$router.push('/');
+ this.$router.push('/recipes');
}
}
},
diff --git a/src/components/MealPlanPage.vue b/src/components/MealPlanPage.vue
index 4d64629..3e34d43 100644
--- a/src/components/MealPlanPage.vue
+++ b/src/components/MealPlanPage.vue
@@ -16,6 +16,7 @@
+ this.$router.push('/meals/add')" />
@@ -76,14 +77,13 @@ ul.actions {
\ No newline at end of file
diff --git a/src/components/ShoppingPage.vue b/src/components/ShoppingPage.vue
index 6c2c4f4..6088278 100644
--- a/src/components/ShoppingPage.vue
+++ b/src/components/ShoppingPage.vue
@@ -1,5 +1,17 @@
- Shopping
+ Shopping
+
this.$router.push('/')" />
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/data.js b/src/data.js
index b61d884..1951a60 100644
--- a/src/data.js
+++ b/src/data.js
@@ -119,6 +119,7 @@ export default {
async deleteRecipe(id) {
var response = await fetch(BASE_URL + `/recipes/${encodeURIComponent(id)}`, {
method: "DELETE",
+ credentials: "include",
});
return await response.json();
}
diff --git a/src/main.js b/src/main.js
index 32bdfd3..1d5646a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -4,7 +4,7 @@ import { createRouter, createWebHashHistory } from 'vue-router'
import App from './App.vue'
import LoginPage from './components/LoginPage.vue'
-import ActionsPage from './components/ActionsPage.vue'
+import RecipesPage from './components/RecipesPage.vue'
import MealPlanPage from './components/MealPlanPage.vue'
import ShoppingPage from './components/ShoppingPage.vue'
import EditMealPage from './components/EditMealPage.vue'
@@ -14,10 +14,11 @@ import EditRecipePage from './components/EditRecipePage.vue'
// Each route should map to a component.
// We'll talk about nested routes later.
const routes = [
- { path: '/', component: ActionsPage },
- { path: '/login', component: LoginPage },
+ { path: '/', component: MealPlanPage },
{ path: '/mealplan', component: MealPlanPage },
+ { path: '/login', component: LoginPage },
{ path: '/shopping', component: ShoppingPage },
+ { path: '/recipes', component: RecipesPage },
{ path: '/recipes/add', component: EditRecipePage },
{ path: '/recipes/:id', component: EditRecipePage, props: true },
{ path: '/meals/add', component: EditMealPage },