Skip to content

Commit

Permalink
[dapp-kit/ts sdk docs] fix a few some tiny typos (MystenLabs#14357)
Browse files Browse the repository at this point in the history
## Description 

^

## Test Plan 
- Eyes

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
williamrobertson13 authored Oct 24, 2023
1 parent c52ba68 commit e550594
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sdk/docs/examples/wallet-hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const UseCurrentWalletExample = withProviders(() => {
</div>
</div>
) : (
<div>Connection status: ${connectionStatus}</div>
<div>Connection status: {connectionStatus}</div>
)}
</div>
);
Expand Down
18 changes: 12 additions & 6 deletions sdk/docs/pages/dapp-kit/rpc-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ details on the full set of options available.
import { useSuiClientQuery } from '@mysten/dapp-kit';

function MyComponent() {
const { data, isLoading, error, refetch } = useSuiClientQuery(
const { data, isLoading, isError, error, refetch } = useSuiClientQuery(
'getOwnedObjects',
{ owner: '0x123' },
{
Expand All @@ -30,6 +30,10 @@ function MyComponent() {
return <div>Loading...</div>;
}

if (isError) {
return <div>Error: {error.message}</div>;
}

return <pre>{JSON.stringify(data, null, 2)}</pre>;
}
```
Expand All @@ -44,17 +48,19 @@ For more details checkout out the
import { useSuiClientInfiniteQuery } from '@mysten/dapp-kit';

function MyComponent() {
const { data, isLoading, isFetching, fetchNextPage, hasNextPage } = useSuiClientInfiniteQuery(
'getOwnedObjects',
{
const { data, isLoading, isError, error, isFetching, fetchNextPage, hasNextPage } =
useSuiClientInfiniteQuery('getOwnedObjects', {
owner: '0x123',
},
);
});

if (isLoading) {
return <div>Loading...</div>;
}

if (isError) {
return <div>Error: {error.message}</div>;
}

return <pre>{JSON.stringify(data, null, 2)}</pre>;
}
```
Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/pages/dapp-kit/sui-client-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { createNetworkConfig, SuiClientProvider, WalletProvider } from '@mysten/
import { type SuiClientOptions } from '@mysten/sui.js/client';

// Config options for the networks you want to connect to
const { networkConfig = createNetworkConfig({
const { networkConfig } = createNetworkConfig({
localnet: { url: getFullnodeUrl('localnet') },
mainnet: { url: getFullnodeUrl('mainnet') },
});
Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/pages/dapp-kit/wallet-hooks/useCurrentWallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function MyComponent() {
</div>
</div>
) : (
<div>Connection status: ${connectionStatus}</div>
<div>Connection status: {connectionStatus}</div>
)}
</div>
);
Expand Down

0 comments on commit e550594

Please sign in to comment.