Skip to content

Commit 076caa1

Browse files
authored
Merge pull request #994 from w3bdesign/993-refactor-more-code
Refactor code
2 parents 4c0146b + 577d738 commit 076caa1

File tree

5 files changed

+5
-37
lines changed

5 files changed

+5
-37
lines changed

components/Checkout/CheckoutButton.vue

Lines changed: 0 additions & 34 deletions
This file was deleted.

components/Checkout/CheckoutForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</ErrorMessage>
2727
</div>
2828
<div class="w-full flex justify-center mt-6">
29-
<CheckoutButton />
29+
<CommonButton>SUBMIT ORDER</CommonButton>
3030
</div>
3131
</div>
3232
</Form>

components/Products/ProductsSingleProduct.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</select>
6666
</p>
6767
<div class="pt-1 mt-2">
68-
<CartAddToCartButton :product="data.product" />
68+
<ProductsAddToCartButton :product="data.product" />
6969
</div>
7070
</div>
7171
</div>

components/common/CommonButton.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<button
55
:class="{ disabled: isLoading }"
66
@click="$emit('CommonButtonClick')"
7+
type="submit"
78
>
89
<slot />
910
<svg
@@ -29,6 +30,7 @@
2930
<button
3031
:class="{ disabled: isLoading }"
3132
@click="$emit('CommonButtonClick')"
33+
type="submit"
3234
>
3335
<slot />
3436
<svg
@@ -54,7 +56,7 @@
5456
<script setup>
5557
/*
5658
* Usage:
57-
* <CommonButton @common-button-click="functionName" isLoading="true">Common button</CommonButton>
59+
* <CommonButton @common-button-click="functionName" is-loading="true" link-to="/link">Common button</CommonButton>
5860
*/
5961
6062
defineEmits(["CommonButtonClick"]);

0 commit comments

Comments
 (0)