diff --git a/frontend/src/utilites/hooks.ts b/frontend/src/utilites/hooks.ts index 532d60227..ea1303efa 100644 --- a/frontend/src/utilites/hooks.ts +++ b/frontend/src/utilites/hooks.ts @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo } from "react"; +import { useCallback, useMemo } from "react"; import { useHistory } from "react-router"; import { useDidUpdate } from "rooks"; import { getBaseUrl } from "."; @@ -28,22 +28,6 @@ export function useHasUpdateInject() { } } -export function useSessionStorage( - key: string -): [StorageType, React.Dispatch] { - const dispatch: React.Dispatch = useCallback( - (value) => { - if (value !== null) { - sessionStorage.setItem(key, value); - } else { - sessionStorage.removeItem(key); - } - }, - [key] - ); - return [sessionStorage.getItem(key), dispatch]; -} - export function useOnLoadingFinish( state: Readonly>, callback: () => void