🚧 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:
@@ -3,7 +3,6 @@
|
||||
</style>
|
||||
|
||||
<script lang="ts">
|
||||
import { cartId } from '$utils/stores/shop'
|
||||
import { addToCart } from '$utils/functions/shop'
|
||||
import { capitalizeFirstLetter } from '$utils/functions'
|
||||
// Components
|
||||
@@ -83,7 +82,7 @@
|
||||
text={hasStock ? 'Add to cart' : 'Sold out'}
|
||||
color="pinklight"
|
||||
disabled={!hasStock}
|
||||
on:click={() => addToCart($cartId, shopProduct)}
|
||||
on:click={() => addToCart(shopProduct)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user