Veselov 9b42223a97
Some checks failed
Deploy / build-and-deploy (push) Failing after 9s
product-card
2025-09-21 01:27:48 +03:00

28 lines
492 B
Vue

<template>
<div class="cart">
<div v-if="cartProducts">
{{ cartProducts }}
</div>
<UButton @click="createOrder">
Оформить заказ
</UButton>
</div>
</template>
<script setup lang="ts">
import { usePostOrdersCreate } from '~/api/mutations'
const { getCart } = useCart()
const cartProducts = getCart()
const { mutateAsync } = usePostOrdersCreate()
const createOrder = () => {
mutateAsync(cartProducts)
}
</script>
<style lang="scss">
</style>