Skip to content

Commit

Permalink
๐Ÿ”ง fix: staleTime ์ˆ˜์ •.
Browse files Browse the repository at this point in the history
๋ฉ”์ธ ํŽ˜์ด์ง€ ์š”์†Œ์— staleTime์„ ์ˆ˜์ •ํ•ด ๋ธ”๋งํ‚น ์ด์Šˆ ์ˆ˜์ •
  • Loading branch information
dannysir committed Dec 4, 2024
1 parent 9fe97be commit e718249
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions FE/src/components/StockIndex/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export default function StockIndex() {
const { data } = useQuery({
queryKey: ['StockIndex'],
queryFn: () => getStockIndex(),
staleTime: 1000,
staleTime: 10000,
cacheTime: 60000,
suspense: true,
});

const { KOSPI, KOSDAQ, KOSPI200, KSQ150 } = data;

return (
<div className='grid w-full grid-cols-1 gap-2 my-2 sm:grid-cols-2 lg:grid-cols-4'>
<div className='my-2 grid w-full grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4'>
<Card name='์ฝ”์Šคํ”ผ' id='KOSPI' initialData={KOSPI} />
<Card name='์ฝ”์Šค๋‹ฅ' id='KOSDAQ' initialData={KOSDAQ} />
<Card name='์ฝ”์Šคํ”ผ200' id='KOSPI200' initialData={KOSPI200} />
Expand Down
2 changes: 1 addition & 1 deletion FE/src/components/TopFive/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function TopFive() {
queryKey: ['topfive', currentMarket],
queryFn: () => getTopFiveStocks(stockIndexMap[currentMarket]),
keepPreviousData: true,
staleTime: 1000,
staleTime: 10000,
cacheTime: 30000,
suspense: true,
});
Expand Down

0 comments on commit e718249

Please sign in to comment.