@refinedev/core
Version:
Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.
13 lines (10 loc) • 357 B
text/typescript
import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
/**
* A hook that the UI uses
* @internal
*/
export const useIsExistAuthentication = (): boolean => {
const { isProvided: legacyIsProvided } = useLegacyAuthContext();
const { isProvided } = useAuthBindingsContext();
return Boolean(isProvided || legacyIsProvided);
};