summaryrefslogblamecommitdiff
path: root/iridescence/src/components/CartCheckout.vue
blob: 19ad70699932d3957ecacc98f0567fab7568cca5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
          






                                                                              

           
 

                








                                                          

         
<template>
  <div id="cartCheckout">
    <div class="buttons">
      <router-link to="/cart" class="button">Cart ({{ inCart }})</router-link>
      <router-link to="/checkout" class="button is-primary">
        Checkout
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: "CartCheckout",
  computed: {
    inCart() {
      return Object.values(this.$store.state.cart).reduce(
        (acc, cur) => acc + cur,
        0
      );
    }
  }
};
</script>