useAdminContext
Hook with no arguments to access some useful values from the AdminContext. It returns an object.
Example usage
AdminContext
The AdminContext
provides the context needed by the admin editing interface.
The useAdminContext
returned object has the following interface
isAdmin
istrue
in the Admin interface andfalse
on the public front-end.previewMode
istrue
when the Full-screen preview is active in the Admin interface andfalse
otherwise.
The <Admin>
component wraps all the children with the AdminContext Provider.