diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-13 10:08:16 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-13 10:08:16 +0700 |
| commit | 0d3c0cf6a00ef81bfdb944490e48f16af41fc029 (patch) | |
| tree | ad5dd0c580c33d4856455a1272a31ce8349ddda9 /src/lib/home/components | |
| parent | 0ecb7ba546cd1fdd3811f76aa09b20642ab4952c (diff) | |
<iman> add radis
Diffstat (limited to 'src/lib/home/components')
| -rw-r--r-- | src/lib/home/components/CategoryDynamicMobile.jsx | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/lib/home/components/CategoryDynamicMobile.jsx b/src/lib/home/components/CategoryDynamicMobile.jsx index 6ede1147..67ae6f5f 100644 --- a/src/lib/home/components/CategoryDynamicMobile.jsx +++ b/src/lib/home/components/CategoryDynamicMobile.jsx @@ -9,29 +9,6 @@ import { fetchCategoryManagementVersion, } from '../api/categoryManagementApi'; -const saveToLocalStorage = (key, data, version) => { - const now = new Date(); - const item = { - value: data, - version: version, - lastFetchedTime: now.getTime(), - }; - localStorage.setItem(key, JSON.stringify(item)); -}; - -const getFromLocalStorage = (key) => { - const itemStr = localStorage.getItem(key); - if (!itemStr) return null; - - const item = JSON.parse(itemStr); - return item; -}; - -const getElapsedTime = (lastFetchedTime) => { - const now = new Date(); - return now.getTime() - lastFetchedTime; -}; - const CategoryDynamicMobile = () => { const [selectedCategory, setSelectedCategory] = useState({}); const [categoryManagement, setCategoryManagement] = useState([]); |
