'use client'
import { useSafeQuery } from "@/hooks/use-safe-query";
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))
}