feat: add shop card in cart

This commit is contained in:
2026-06-23 21:24:08 +03:00
parent 7a8ce9083d
commit 21a39f21d8
3 changed files with 66 additions and 13 deletions
+9 -4
View File
@@ -37,9 +37,14 @@ export const updateItem = (id, itemData) =>
export const deleteItem = (id) => axios.delete(`${API_URL}/items/${id}`);
export const getAllCategories = () => axios.get(`${API_URL}/getCategories`)
export const getAllCategories = () => axios.get(`${API_URL}/getCategories`);
export const getCart = () => axios.get(`${API_URL}/cart/`);
export const addToCart = (data) => axios.post(`${API_URL}/cart/`, data)
export const updateCartItem = (id, data) => axios.post(`${API_URL}/cart/${id}`, data)
export const removeFromCart = (id) => axios.post(`${API_URL}/cart/${id}`)
export const addToCart = (data) => axios.post(`${API_URL}/cart/`, data);
export const updateCartItem = (id, data) =>
axios.post(`${API_URL}/cart/${id}`, data);
export const removeFromCart = (id) => axios.post(`${API_URL}/cart/${id}`);
export const createOrder = (data) => axios.post(`${API_URL}/orders/`, data);
export const getUserOrders = () => axios.get(`${API_URL}/orders/`);
export const getOrder = (id) => axios.get(`${API_URL}/orders/${id}`);