<GatedComponent />
To use <GatedComponent/>
, wrap any content you wish to gate with this component, and provide the required props, including an array of policyIds
and a walletAddress
. If the policy rules associated with the provided policyIds
are satisfied for the given walletAddress
, the children components will be rendered. Otherwise, the content will not be displayed.
policyIds
Array<string>
An array of policy IDs. These are identifiers for the policies that will be evaluated to determine if the child components should be rendered. It is essential to have these policies created and configured beforehand.
walletAddress
string
The wallet address to be evaluated against the specified policies. The content within the <GatedComponent/>
will only be rendered if the wallet address satisfies the conditions defined by the policies identified in policyIds
.
children
React.ReactNode
The content or components that are to be conditionally rendered based on the policy evaluation outcome. If the policy conditions are met for the provided walletAddress
, these children components will be displayed.
Updated about 1 month ago
Table of Contents
Usage
Props