useModal
hook provides methods to control the Para modal’s visibility. This is useful for programmatically opening the modal for authentication or wallet management.
Import
Usage
Parameters
This hook does not accept any parameters.Return Type
Example: Conditional Modal Control
Example: Auto-open on Mount
Notes
- The modal component (
<ParaModal />
) must be rendered within theParaProvider
for this hook to work - Opening the modal when a user is not connected will show the authentication flow
- Opening the modal when a user is connected will show wallet management options
- The modal can be closed by the user clicking outside or using the close button