summaryrefslogtreecommitdiff
path: root/src/lib/home/hooks/useHeroBanner.js
blob: a15dda600c518738dcfceae10fa452e73a8321f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import heroBannerApi from "../api/heroBannerApi"
import { useQuery } from "react-query"

const useHeroBanner = () => {
  const fetchHeroBanner = async () => await heroBannerApi()
  const { isLoading, data } = useQuery("heroBanner", fetchHeroBanner) 
  
  return {
    heroBanners: { data, isLoading }
  }
}

export default useHeroBanner