11 lines
272 B
TypeScript
11 lines
272 B
TypeScript
|
import { createContext } from 'react'
|
||
|
import localforage from 'localforage'
|
||
|
|
||
|
interface StorageContextProps {
|
||
|
getPersistedStorage: () => typeof localforage
|
||
|
}
|
||
|
|
||
|
export const StorageContext = createContext<StorageContextProps>({
|
||
|
getPersistedStorage: () => localforage,
|
||
|
})
|