-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Update Cart.vue to improve empty cart message and add loadi…
…ng icon
- Loading branch information
Showing
2 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
woonuxt_base/app/components/shopElements/EmptyCartMessage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script setup lang="ts"> | ||
const { toggleCart } = useCart(); | ||
</script> | ||
|
||
<template> | ||
<div class="flex flex-col items-center justify-center flex-1 mb-20 text-gray-400"> | ||
<Icon name="ion:cart-outline" size="96" class="opacity-75 mb-5" /> | ||
<div class="mb-2 text-xl font-semibold">{{ $t('messages.shop.cartEmpty') }}</div> | ||
<span class="mb-8">{{ $t('messages.shop.addProductsInYourCart') }}</span> | ||
<NuxtLink | ||
to="/products" | ||
@click="toggleCart(false)" | ||
class="flex items-center justify-center gap-3 p-2 px-3 mt-4 font-semibold text-center text-white rounded-lg shadow-md bg-primary hover:bg-primary-dark"> | ||
{{ $t('messages.shop.browseOurProducts') }} | ||
</NuxtLink> | ||
</div> | ||
</template> |