Class

useCurrentAdmin

useCurrentAdmin

Hook which allows you to get and set currentAdmin

Usage

import { useCurrentAdmin } from 'admin-bro'

const myComponent = () => {
  const [currentAdmin, setCurrentAdmin] = useCurrentAdmin()
  // ...
}

Type Definitions

Array

# UseCurrentAdminResponse

Result of the useCurrentAdmin. It is a tuple containing value and the setter

Properties:
Name Type Attributes Description
0 CurrentAdmin | null <optional>

current admin

1 React.Dispatch.<React.SetStateAction.<CurrentAdmin>> <optional>

value setter compatible with react useState

View Source admin-bro/src/frontend/hooks/use-current-admin.ts, line 34

SoftwareBrothers

Proudly built and maintained by SoftwareBrothers

Software House with a passion for both JavaScript and TypeScript.

See what we do See what we believe in

Proudly built and maintained by

SoftwareBrothers