diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-02 17:02:12 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-02 17:02:12 +0700 |
| commit | 405dc33dba63f008f45b76061a8f1be5031a1d5d (patch) | |
| tree | 7d60a44153dfadd11f0ff0a81144720b961b5823 /src/lib/home/hooks | |
| parent | d336735a91133cc3f1cf6f67ba2ac29f0985fd2e (diff) | |
midtrans integration
Diffstat (limited to 'src/lib/home/hooks')
| -rw-r--r-- | src/lib/home/hooks/useCategoryHome.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/home/hooks/useCategoryHome.js b/src/lib/home/hooks/useCategoryHome.js index cfaa3d9c..ea9f8d6a 100644 --- a/src/lib/home/hooks/useCategoryHome.js +++ b/src/lib/home/hooks/useCategoryHome.js @@ -3,7 +3,9 @@ import { useQuery } from 'react-query' const useCategoryHome = ({ id }) => { const fetchCategoryHome = async () => await categoryHomeApi({ id }) - const { isLoading, data } = useQuery(`categoryHome-${id}`, fetchCategoryHome) + const { isLoading, data } = useQuery(`categoryHome-${id}`, fetchCategoryHome, { + refetchOnWindowFocus: false + }) return { categoryHome: { data, isLoading } |
