import React from 'react'; export interface IAccessContext { isAdmin: boolean; hasAccess: ( permission: string | string[], project?: string, environment?: string, ) => boolean; } const hasAccessPlaceholder = () => { throw new Error('hasAccess called outside AccessContext'); }; const AccessContext = React.createContext({ isAdmin: false, hasAccess: hasAccessPlaceholder, }); export default AccessContext;