Frontend updates: caching basic data (json) from CDragon
Implement caching in the patch_detector, consume the cache from API routes in frontend
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
import { debounce, isEmpty } from '~/utils/helpers'
|
||||
|
||||
// Constants
|
||||
const CDRAGON_CHAMPIONS_URL =
|
||||
CDRAGON_BASE + 'plugins/rcp-be-lol-game-data/global/default/v1/champion-summary.json'
|
||||
const CHAMPIONS_API_URL = '/api/champions'
|
||||
|
||||
// State
|
||||
@@ -11,7 +9,7 @@ const {
|
||||
data: championsData,
|
||||
pending: loadingChampions,
|
||||
error: championsError
|
||||
} = useFetch(CDRAGON_CHAMPIONS_URL, {
|
||||
} = useFetch('/api/cdragon/champion-summary', {
|
||||
key: 'champions-data',
|
||||
lazy: false,
|
||||
server: false // Disable server-side fetching to avoid hydration issues
|
||||
|
||||
Reference in New Issue
Block a user