Skip to content

Commit 89bdbc4

Browse files
authored
Merge pull request #1374 from w3bdesign/dev
Hide checkout button on checkout
2 parents b08d123 + fce6a6a commit 89bdbc4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

components/Cart/CartContents.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@remove="handleRemoveProduct"
1616
/>
1717
</section>
18-
<CommonButton link-to="/checkout" center-button>
18+
<CommonButton v-if="showCheckoutButton" link-to="/checkout" center-button>
1919
CHECKOUT
2020
</CommonButton>
2121
</div>
@@ -33,6 +33,13 @@ import { computed, ref, onMounted } from 'vue';
3333
import { useCart } from "@/store/useCart";
3434
import CommonButton from '@/components/common/CommonButton.vue';
3535
36+
const props = defineProps({
37+
showCheckoutButton: {
38+
type: Boolean,
39+
default: false
40+
}
41+
});
42+
3643
const cart = useCart();
3744
const isLoading = ref(true);
3845
const error = ref(null);

pages/cart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<CartContents show-checkout-button />
3+
<CartContents :show-checkout-button="true" />
44
</div>
55
</template>
66

0 commit comments

Comments
 (0)