From 015d67cf738e4ad6d397824dc09a44d85d643b75 Mon Sep 17 00:00:00 2001
From: Mateja <mail@matejamaric.com>
Date: Thu, 29 Jul 2021 02:46:33 +0200
Subject: Fully implement client-side login system...

---
 client/src/views/Checkout.vue | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'client/src/views/Checkout.vue')

diff --git a/client/src/views/Checkout.vue b/client/src/views/Checkout.vue
index 52da138..7004b1f 100644
--- a/client/src/views/Checkout.vue
+++ b/client/src/views/Checkout.vue
@@ -16,7 +16,10 @@
         <p class="text-center my-3 fw-bold">You can buy {{ cartSize }} items for ${{ cartPrice }}.</p>
       </div>
       <div class="col-md-4 card p-2" v-if="cartSize">
-        <div ref="paypal"></div>
+        <div ref="paypal" v-if="isLoggedIn"></div>
+        <p v-else class="fw-bold text-center my-auto">
+          You need to be logged in to make a purchase.
+        </p>
       </div>
     </div>
   </div>
@@ -55,6 +58,9 @@ export default {
     },
     cartPrice() {
       return this.$store.getters.getCartPrice;
+    },
+    isLoggedIn() {
+      return this.$store.getters.isLoggedIn;
     }
   },
   methods: {
-- 
cgit v1.2.3-70-g09d2

