@refinedev/core
Version:
refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.
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);
};