Skip to content

Commit

Permalink
feat(docs): update integrate capsule
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki committed Apr 21, 2024
1 parent e1a2872 commit c26a4fe
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/docs/guides/integrate-capsule.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,30 @@
yarn add @leapwallet/cosmos-social-login-capsule-provider-ui
```

## Example Next JS
## Fill your Capsule Config in `GrazProvider`

```javascript
<GrazProvider
grazOptions={{
chains,
onReconnectFailed: () => {
console.log("reconnect failed");
},
autoReconnect: false,
walletConnect: {
options: {
projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
},
},
capsuleConfig: {
apiKey: process.env.NEXT_PUBLIC_CAPSULE_API_KEY,
env: process.env.NEXT_PUBLIC_CAPSULE_ENV,
},
}}
/>
```

## Next JS Usage

For Next JS we recommend to load the module dynamically to avoid SSR issues. And use `useCapsule` hook to get the client and other capsule related states.

Expand Down

0 comments on commit c26a4fe

Please sign in to comment.