import type { FC, PropsWithChildren } from 'react'; import { createContext, useContext } from 'react'; export interface Storage { getItem: (key: string) => Promise; setItem: (key: string, value: string) => Promise; } const StorageContext = createContext({ getItem: async () => null, setItem: async () => {}, }); export const StorageProvider: FC> = ({ storage, children, }) => { return {children}; }; export const useStorage = () => useContext(StorageContext);