initial
This commit is contained in:
1
api/queries/index.ts
Normal file
1
api/queries/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './useGetProductList'
|
||||
9
api/queries/useGetProductList.ts
Normal file
9
api/queries/useGetProductList.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { useQuery } from '@tanstack/vue-query'
|
||||
import { getProductList } from '~/api/endpoints'
|
||||
|
||||
export const useGetProductList = () => {
|
||||
return useQuery({
|
||||
queryKey: ['get-product-list'],
|
||||
queryFn: () => getProductList(),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user