Role
Components
The Role component family provides the following components:
RoleBlock
A component to block access based on a FreeSewing role. Note that in an SPA, blocking access to the user is merely a matter of providing a more intuitive UI. That actual access control is implemented on the backend.
You can import the RoleBlock
component from the role component family in the @freesewing/react
package:
Javascript
import { RoleBlock } from "@freesewing/react/components/Role"
UserVisitorContent
A component to display different content to users or visitors. This is a convenience component to not have to check for a user account is many different places.
You can import the UserVisitorContent
component from the role component family in the @freesewing/react
package:
Javascript
import { UserVisitorContent } from "@freesewing/react/components/Role"