diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-07-27 08:27:54 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-07-27 08:27:54 +0700 |
| commit | e5a01976cb665b824b2ad6426a2c52a5bd0964e6 (patch) | |
| tree | 2225b76f4824c5f9e80467dceedf257c46887297 /src/lib/home/hooks | |
| parent | 4758a0989f2ec0d79e1c5e3a3d42c249f28a9e72 (diff) | |
<iman> add feature category lob
Diffstat (limited to 'src/lib/home/hooks')
| -rw-r--r-- | src/lib/home/hooks/useCategoryPilihan.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/home/hooks/useCategoryPilihan.js b/src/lib/home/hooks/useCategoryPilihan.js new file mode 100644 index 00000000..12a86f7e --- /dev/null +++ b/src/lib/home/hooks/useCategoryPilihan.js @@ -0,0 +1,13 @@ +import categoryPilihanApi from '../api/CategoryPilihanApi' +import { useQuery } from 'react-query' + +const useCategoryPilihan = () => { + const fetchCategoryPilihan = async () => await categoryPilihanApi() + const { isLoading, data } = useQuery('categoryPilihanApi', fetchCategoryPilihan) + + return { + categoryPilihan: { data, isLoading } + } +} + +export default useCategoryPilihan
\ No newline at end of file |
