Skip to content

Commit

Permalink
update readme for Next.js gotcha (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
gane5h authored Nov 17, 2023
1 parent 83b033e commit fe75089
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { GoldRushProvider } from "@covalenthq/goldrush-kit";
import "@covalenthq/goldrush-kit/styles.css";
```

5. Add desired components. Visit GoldRush's [component documentation](https://www.covalenthq.com/docs/unified-api/goldrush/kit/gold-rush-provider/) for more information.
5. Add desired components. If you're using `next.js`, make sure you have `use client;` at the top of the file to disable Next's server component modules. Visit GoldRush's [component documentation](https://www.covalenthq.com/docs/unified-api/goldrush/kit/gold-rush-provider/) for more information.

```tsx
import {
Expand All @@ -51,9 +51,11 @@ import {

## Ready-to-go example

Here's a full example that you can copy-paste to get started.
Here's a full example that you can copy-paste to get started. If you're using `next.js`, make sure you have `use client;` at the top of the file to disable Next's server component modules.

```tsx
// 'use client';
// If using Next.js
<GoldRushProvider apikey="<YOUR_API_KEY>" mode="dark" color="emerald">
<TokenBalancesListView
chain_names={[
Expand Down

0 comments on commit fe75089

Please sign in to comment.