mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 13:41:22 +00:00
22 lines
334 B
TypeScript
22 lines
334 B
TypeScript
import { Cart } from '../types'
|
|
|
|
import api from '../api/cart'
|
|
|
|
export interface CartResponse {
|
|
data: Cart | null
|
|
isLoading: boolean
|
|
isEmpty: boolean
|
|
}
|
|
|
|
export default function useCart(): CartResponse {
|
|
const cart = api.get()
|
|
|
|
console.log({ cart })
|
|
|
|
return {
|
|
data: null,
|
|
isLoading: false,
|
|
isEmpty: true,
|
|
}
|
|
}
|