From 1b2e94be50279dfc5d24e49c75fce8262fd55adb Mon Sep 17 00:00:00 2001 From: Daniel Leavitt Date: Thu, 5 Sep 2024 08:44:50 -0700 Subject: [PATCH] added initial explanation for apiLockedList.tsx --- docs/content/guides/developer/app-examples/trustless-swap.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/content/guides/developer/app-examples/trustless-swap.mdx b/docs/content/guides/developer/app-examples/trustless-swap.mdx index fb6df2e989211..2ae0ef7b188c4 100644 --- a/docs/content/guides/developer/app-examples/trustless-swap.mdx +++ b/docs/content/guides/developer/app-examples/trustless-swap.mdx @@ -1957,6 +1957,10 @@ Add `src/components/locked/ApiLockedList.tsx`: {@inject: examples/trading/frontend/src/components/locked/ApiLockedList.tsx} +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: