import { useUserContext } from 'react-doorman' import { theme } from '../style/theme' export const useDoormanTheme = () => { const context = useUserContext() if (!context) { console.error( 'Doorman context requested without the Provider initialized. Make sure to wrap the root of your app with the Doorman provider component.' ) } return context?.theme ?? theme() }