File tree Expand file tree Collapse file tree
features/cards/components/producthuntCard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,16 @@ import { ProductHuntPlaceholder } from 'src/components/placeholders'
66import ArticleItem from './ArticleItem'
77
88export function ProductHuntCard ( { meta, withAds } : CardPropsType ) {
9- const { data : products = [ ] , isLoading, error } = useGeProductHuntProducts ( )
9+ const {
10+ data : products = [ ] ,
11+ isLoading,
12+ error,
13+ } = useGeProductHuntProducts ( {
14+ config : {
15+ staleTime : 900000 , //15 minutes
16+ cacheTime : 3600000 , // 1 Day
17+ } ,
18+ } )
1019
1120 const renderItem = ( item : Article , index : number ) => (
1221 < ArticleItem item = { item } key = { `ph-${ index } ` } index = { index } analyticsTag = { meta . analyticsTag } />
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ const queryConfig: DefaultOptions = {
77 useErrorBoundary : false ,
88 refetchOnWindowFocus : false ,
99 retry : false ,
10+ staleTime : 3600000 , //1 Hour
11+ cacheTime : 3600000 , // 1 Day
1012 } ,
1113} ;
1214
You can’t perform that action at this time.
0 commit comments