Skip to content

Commit 0cc51b3

Browse files
authored
hotfix: example app fixes (#1888)
1 parent f61a4b4 commit 0cc51b3

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

examples/enskit-react-example/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ The app connects to a local ENSNode instance and includes demos for browsing dom
1010
# from the ENSNode monorepo root
1111
pnpm install
1212

13-
# set the ENSNODE_URL to a NameHash Hosted Instance and run this example in dev mode
14-
ENSNODE_URL=https://api.alpha.ensnode.io pnpm -F enskit-react-example dev
13+
# set the VITE_ENSNODE_URL to a NameHash Hosted Instance and run this example in dev mode
14+
VITE_ENSNODE_URL=https://api.alpha.ensnode.io pnpm -F enskit-react-example dev
1515
```
1616

1717
## Usage (with Local ENSNode)

examples/enskit-react-example/src/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import { RegistryView } from "./RegistryView";
1414
* To override, provide ENSNODE_URL in your environment like:
1515
* ENSNODE_URL=https://api.alpha.ensnode.io pnpm dev
1616
*/
17-
const ENSNODE_URL = import.meta.env.ENSNODE_URL ?? "http://localhost:4334";
17+
const ENSNODE_URL = import.meta.env.VITE_ENSNODE_URL ?? "http://localhost:4334";
18+
19+
console.log(`Connecting to ENSNode at ${ENSNODE_URL}`);
1820

1921
/**
2022
* Constructs an EnsNodeClient and extends it with the Omnigraph module, for use with `enskit`.

examples/enskit-react-example/src/PaginationView.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export function PaginationView() {
4545
This showcases trivial cursor-based pagination (inc. infinite-scroll) for resources in the
4646
Omnigraph API.
4747
</p>
48+
<p>
49+
Note that if you've viewed the <Link to="/domain/eth">Domain Browser</Link>, many subdomains
50+
of 'eth' here will show up <b>instantly</b> — that's the cache at work! Refresh the page to
51+
clear the urql cache and see pagination in action.
52+
</p>
4853

4954
<ul>
5055
{subdomains?.edges.map((edge) => (

0 commit comments

Comments
 (0)