diff --git a/src/App.vue b/src/App.vue index 966dc60..c785ebd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,6 +4,7 @@ + @@ -15,7 +16,7 @@ Explore - Collection + Collection diff --git a/src/router/index.js b/src/router/index.js index 34629f8..3ae6ca8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,5 +1,6 @@ import { createRouter, createWebHistory } from 'vue-router' import Explore from "@/views/Explore"; +import Collection from "@/views/Collection"; const routes = [ { @@ -8,8 +9,9 @@ const routes = [ component: Explore }, { - path: '/about', - name: 'About', + path: '/collection', + name: 'Collection', + component: Collection }, ] diff --git a/src/store/index.js b/src/store/index.js new file mode 100644 index 0000000..e06d446 --- /dev/null +++ b/src/store/index.js @@ -0,0 +1,25 @@ +import {createStore} from 'vuex' +import iziToast from "izitoast"; + +export default createStore({ + state: { + collection: [], + wishlist: [], + }, + mutations: { + addOwned(state, minifig) { + state.collection.push(minifig); + iziToast.success({ + title: minifig.name+' has been added to your collection' + }); + }, + addWished(state, minifig) { + state.wishlist.push(minifig); + iziToast.success({ + title: minifig.name+' has been added to your collection' + }); + } + }, + actions: {}, + modules: {} +}) diff --git a/src/views/About.vue b/src/views/About.vue deleted file mode 100644 index 3fa2807..0000000 --- a/src/views/About.vue +++ /dev/null @@ -1,5 +0,0 @@ - - - This is an about page - - diff --git a/src/views/Collection.vue b/src/views/Collection.vue new file mode 100644 index 0000000..58a72a1 --- /dev/null +++ b/src/views/Collection.vue @@ -0,0 +1,26 @@ + + + + + + + + + + + ❤ + + + + + + + + + + \ No newline at end of file diff --git a/src/views/Explore.vue b/src/views/Explore.vue index 3b444b9..e8330aa 100644 --- a/src/views/Explore.vue +++ b/src/views/Explore.vue @@ -3,12 +3,20 @@ - - + + + Keine Ergebnisse + + + + + + + ❤ + @@ -17,6 +25,7 @@