diff --git a/webapp/src/reducer/polling.js b/webapp/src/reducer/polling.js index 521f5c7..750f2ca 100644 --- a/webapp/src/reducer/polling.js +++ b/webapp/src/reducer/polling.js @@ -1,9 +1,9 @@ import { useReducer } from 'react'; -import { useLocalStorage } from '../util/PersistentStorage'; +import { namedLocalStorage } from '../util/PersistentStorage'; import { nextState } from '../util/StateHelper'; const Persistent = (() => { - const [getEnabled, setEnabled] = useLocalStorage('polling.enabled', true); + const [getEnabled, setEnabled] = namedLocalStorage('polling.enabled', true); return { getEnabled, diff --git a/webapp/src/util/PersistentStorage.js b/webapp/src/util/PersistentStorage.js index ea44750..3745cdc 100644 --- a/webapp/src/util/PersistentStorage.js +++ b/webapp/src/util/PersistentStorage.js @@ -1,4 +1,4 @@ -export function useLocalStorage(name, initialValue) { +export function namedLocalStorage(name, initialValue) { const get = () => localStorage.getItem(name); const del = () => localStorage.removeItem(name); @@ -14,7 +14,7 @@ export function useLocalStorage(name, initialValue) { return [get, set, del] } -export function useSessionStorage(name, initialValue) { +export function namedSessionStorage(name, initialValue) { const get = () => sessionStorage.getItem(name); const del = () => sessionStorage.removeItem(name);