🚧 Switch to swell-js to handle Shop cart

swell-node was relying too much on Node packages like crypto or events to be used with Cloudflare Pages or Vercel Edge Functions
This commit is contained in:
2022-09-18 12:11:44 +02:00
parent b3fdc5cea5
commit b66db25942
12 changed files with 210 additions and 351 deletions

View File

@@ -3,7 +3,6 @@
</style>
<script lang="ts">
import { cartId } from '$utils/stores/shop'
import { addToCart } from '$utils/functions/shop'
import { smoothScroll } from '$utils/functions'
// Components
@@ -43,7 +42,7 @@
size="xsmall"
text="Add to cart"
color="pink"
on:click={() => addToCart($cartId, product)}
on:click={() => addToCart(product)}
/>
</div>
</div>