File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import httpClient from '@/lib/httpClient'
88import Docs from '@/types/docs.type'
99import { useQuery } from 'react-query'
1010import { getAccessToken } from '@/lib/httpClient/getAccessToken'
11+ import queryKey from '@/constants/queryKey.constants'
1112
1213const Aside = ( ) => {
1314 const [ page , setPage ] = React . useState ( 0 )
@@ -17,7 +18,7 @@ const Aside = () => {
1718 return ( await httpClient . lastModified . getInQuery ( 'page' , page ) ) . data
1819 }
1920
20- const { refetch } = useQuery ( 'getLastModifiedDocs' , onGetLastModifiedDocs , {
21+ const { refetch } = useQuery ( [ queryKey . getLastModify ] , onGetLastModifiedDocs , {
2122 onSuccess : ( data ) => {
2223 setLastModifiedDocs ( data )
2324 } ,
Original file line number Diff line number Diff line change 1+ const queryKey = {
2+ getLastModify : 'getLastModify' ,
3+ }
4+
5+ export default queryKey
You can’t perform that action at this time.
0 commit comments