Skip to content

Commit

Permalink
added initial explanation for apiLockedList.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
dantheman8300 committed Sep 5, 2024
1 parent 2b3935d commit 1b2e94b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/content/guides/developer/app-examples/trustless-swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1957,6 +1957,10 @@ Add `src/components/locked/ApiLockedList.tsx`:
{@inject: examples/trading/frontend/src/components/locked/ApiLockedList.tsx}
</details>
This hook Fetches all the non-deleted system `Locked` objects from the API in a paginated fashion. Then, it proceeds into fetching the on-chain state, so we can better trust the latest state of the object in regards to ownership.
This component uses tanstack's `useInfiniteQuery` instead of `useSuiClientInfiniteQuery` since the data is being fetched from the example's API rather than Sui.
:::danger[Checkpoint]
Run your app and ensure you can:
Expand Down

0 comments on commit 1b2e94b

Please sign in to comment.