Vista (intefaz y bd), esquema y endpoints de store agregados
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
'use client'
|
||||
import { useSafeQuery } from "@/hooks/use-safe-query";
|
||||
import { getInventoryAction} from "../actions/actions";
|
||||
import { getInventoryAction, getAllProducts } from "../actions/actions";
|
||||
|
||||
// Hook for users
|
||||
export function useProductQuery(params = {}) {
|
||||
return useSafeQuery(['product',params], () => getInventoryAction(params))
|
||||
}
|
||||
|
||||
export function useAllProductQuery(params = {}) {
|
||||
return useSafeQuery(['product',params], () => getAllProducts(params))
|
||||
}
|
||||
Reference in New Issue
Block a user