()
| 30 | }; |
| 31 | |
| 32 | const getCachedModels = (): string[] => { |
| 33 | try { |
| 34 | const cachedData = sessionStorage.getItem(LocalStore.models); |
| 35 | if (!cachedData) return []; |
| 36 | const { models } = JSON.parse(cachedData) as ModelsCache; |
| 37 | return models; |
| 38 | } catch { |
| 39 | return []; |
| 40 | } |
| 41 | }; |
| 42 | |
| 43 | const updateCache = (models: string[]) => { |
| 44 | const cacheData: ModelsCache = { |