import { createContext, useContext } from 'react' export type Me = { did: string handle: string | null storageMode: 'space' | 'local' backgroundSync: boolean roles: string[] } export const MeContext = createContext(null) export function useMe(): Me { const me = useContext(MeContext) if (!me) throw new Error('useMe needs a signed-in user') return me }