import { useQuery } from "@tanstack/react-query";
import * as api from "../service/Service";

export const useGetLanding = () => {
  return useQuery({
    queryKey: ["landing"],
    queryFn: api.getLanding,
  });
};

export const getLandingQueryOptions = {
  queryKey: ["landing"],
  queryFn: api.getLanding,
};

export const useGetPopularProducts = () => {
  return useQuery({
    queryKey: ["popular-products"],
    queryFn: api.getPopularProducts,
  });
};
