diff --git a/src/components/EventArchiveCacheSettings/index.tsx b/src/components/EventArchiveCacheSettings/index.tsx index 658d41e5..d222d031 100644 --- a/src/components/EventArchiveCacheSettings/index.tsx +++ b/src/components/EventArchiveCacheSettings/index.tsx @@ -1,6 +1,5 @@ import { Button } from '@/components/ui/button' import { Label } from '@/components/ui/label' -import { Switch } from '@/components/ui/switch' import { Input } from '@/components/ui/input' import { StorageKey } from '@/constants' import { @@ -22,7 +21,6 @@ function platformLabel(): string { export default function EventArchiveCacheSettings() { const { t } = useTranslation() - const [enabled, setEnabled] = useState(true) const [maxMb, setMaxMb] = useState('') const [maxEvents, setMaxEvents] = useState('') const [sessionLru, setSessionLru] = useState('') @@ -51,14 +49,12 @@ export default function EventArchiveCacheSettings() { }, [t]) useEffect(() => { - setEnabled(window.localStorage.getItem(StorageKey.EVENT_ARCHIVE_ENABLED) !== 'false') setMaxMb(window.localStorage.getItem(StorageKey.EVENT_ARCHIVE_MAX_MB) ?? '') setMaxEvents(window.localStorage.getItem(StorageKey.EVENT_ARCHIVE_MAX_EVENTS) ?? '') setSessionLru(window.localStorage.getItem(StorageKey.SESSION_EVENT_LRU_MAX) ?? '') }, []) const apply = useCallback(() => { - window.localStorage.setItem(StorageKey.EVENT_ARCHIVE_ENABLED, enabled ? 'true' : 'false') const mb = maxMb.trim() if (mb) window.localStorage.setItem(StorageKey.EVENT_ARCHIVE_MAX_MB, mb) else window.localStorage.removeItem(StorageKey.EVENT_ARCHIVE_MAX_MB) @@ -71,7 +67,7 @@ export default function EventArchiveCacheSettings() { client.reapplySessionLruFromSettings() invalidateArchiveFootprintCache() toast.success(t('eventArchive.appliedToast')) - }, [enabled, maxMb, maxEvents, sessionLru, t]) + }, [maxMb, maxEvents, sessionLru, t]) const effective = getEventArchiveConfig() @@ -81,17 +77,6 @@ export default function EventArchiveCacheSettings() {

{t('eventArchive.sectionBlurb')}

{defaultsHint}

-
- - setEnabled(Boolean(v))} - /> -
-