diff options
Diffstat (limited to 'iridescence/src')
-rw-r--r-- | iridescence/src/components/Navbar.vue | 3 | ||||
-rw-r--r-- | iridescence/src/components/ProductSearch.vue | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/iridescence/src/components/Navbar.vue b/iridescence/src/components/Navbar.vue index 6b9f609..3a3390c 100644 --- a/iridescence/src/components/Navbar.vue +++ b/iridescence/src/components/Navbar.vue @@ -21,6 +21,9 @@ <router-link to="/faq" class="navbar-item"> F.A.Q. </router-link> + <router-link to="/about" class="navbar-item"> + About Us + </router-link> <router-link to="/care" class="navbar-item"> Care & Handling </router-link> diff --git a/iridescence/src/components/ProductSearch.vue b/iridescence/src/components/ProductSearch.vue index d492b66..f60931c 100644 --- a/iridescence/src/components/ProductSearch.vue +++ b/iridescence/src/components/ProductSearch.vue @@ -45,6 +45,7 @@ export default { data() { return { term: "", + searchTimer: function() {}, sortOptions: { "Featured Items": a => (a.featured ? -1 : 1), "In Stock": (a, b) => a.quantity < b.quantity, @@ -72,7 +73,10 @@ export default { }, methods: { updateSearch() { - this.$store.commit("searchTerm", this.term); + clearTimeout(this.searchTimer); + this.timeout = setTimeout(() => { + this.$store.commit("searchTerm", this.term); + }, 1000); }, updateSort() { this.$store.commit("compare", this.sortOptions[this.sortOptionName]); @@ -80,3 +84,5 @@ export default { } }; </script> + + |