// imports import { useMutation } from "@tanstack/vue-query"; import { API_ENDPOINTS } from "~/constants"; const useDeleteCartAll = () => { // state const { $axios: axios } = useNuxtApp(); // methods const handleDeleteCartAll = async () => { const { data } = await axios.delete( API_ENDPOINTS.orders.cart.delete_all ); return data; }; return useMutation({ mutationFn: () => handleDeleteCartAll(), }); }; export default useDeleteCartAll;