diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-07-29 15:23:01 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-07-29 15:23:01 +0700 |
| commit | a59ed6e73a599a82d6ef248c57ad29f2ab9cb15d (patch) | |
| tree | d87d37a5dafda05e44123be8a0cf1791d086e3ae /src/lib/home/hooks | |
| parent | b951ed0de4285076a71f57a0e440b5e68d4a44bd (diff) | |
<iman> Merge branch 'Feature/category-management' into development
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 |
