Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update react hooks links #1129

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions packages/docs/docs/dev/hooks-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ console.log(account);
// fuel1r20zhd...
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useAccount.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useAccount.ts)

## `useAccounts`

Expand All @@ -27,7 +27,7 @@ console.log(accounts);
// [fuel1r20zhd..., fuel1qqluc9..., ...]
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useAccounts.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useAccounts.ts)

## `useBalance`

Expand All @@ -43,7 +43,7 @@ console.log(balance);
// 1000 (example balance)
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useBalance.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useBalance.ts)

## `useChain`

Expand All @@ -54,7 +54,7 @@ const { chain } = useChain();
console.log(chain.name);
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useChain.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useChain.ts)

## `useConnect`

Expand All @@ -70,7 +70,7 @@ const handleConnect = async () => {
handleConnect();
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useConnect.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useConnect.ts)

## `useConnectors`

Expand All @@ -82,7 +82,7 @@ const { connector } = useConnectors();
console.log(connectors);
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useConnectors.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useConnectors.ts)

## `useDisconnect`

Expand All @@ -98,7 +98,7 @@ const handleDisconnect = async () => {
handleDisconnect();
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useDisconnect.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useDisconnect.ts)

## `useIsConnected`

Expand All @@ -110,7 +110,7 @@ console.log(isConnected);
// true
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useIsConnected.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useIsConnected.ts)

## `useNodeInfo`

Expand All @@ -120,7 +120,7 @@ Asynchronously retrieves information about the connected node, checks compatibil
const { isCompatible } = useNodeInfo();
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useNodeInfo.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useNodeInfo.ts)

## `useProvider`

Expand All @@ -130,7 +130,7 @@ Returns the provider from the Fuel object instance.
const { provider } = useProvider();
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useProvider.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useProvider.ts)

## `useTransaction`

Expand All @@ -140,7 +140,7 @@ Retrieves transaction information associated with a specific transaction ID by u
const { transaction } = useTransaction({ txId: 'fuel1r20zhd...' });
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useTransaction.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useTransaction.ts)

## `useTransactionReceipts`

Expand All @@ -152,7 +152,7 @@ const { transactionReceipts } = useTransactionReceipts({
});
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useTransactionReceipts.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useTransactionReceipts.ts)

## `useWallet`

Expand All @@ -162,4 +162,4 @@ Retrieves wallet instance `<FuelWalletLocked | undefined>` and ensures the prese
const { wallet } = useWallet({ address: 'fuel1r20zhd...' });
```

[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useWallet.tsx)
[See the source file](https://github.com/FuelLabs/fuels-wallet/blob/master/packages/react/src/hooks/useWallet.ts)
Loading