Skip to content

Commit

Permalink
add imports
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAlec committed Nov 21, 2024
1 parent 81eb905 commit 88d8c20
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
13 changes: 5 additions & 8 deletions site/docs/pages/swap/swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ If you'd like more customization, follow the implementation guide for our `Swap`

```tsx twoslash
import { Avatar, Name } from '@coinbase/onchainkit/identity';
import { SwapDefault } from '@coinbase/onchainkit/swap'; // [!code focus]
import { Wallet, ConnectWallet } from '@coinbase/onchainkit/wallet';
import { useAccount } from 'wagmi';
import type { Token } from '@coinbase/onchainkit/token';
Expand Down Expand Up @@ -71,18 +70,16 @@ export default function SwapComponents() {
chainId: 8453,
};
// ---cut-before---
// omitted for brevity
import { SwapDefault } from '@coinbase/onchainkit/swap'; // [!code focus]

// the first token in array will be initially selected token // [!code focus]
const swappableFromTokens: Token[] = [wethToken, usdcToken, ethToken, degenToken]; // [!code focus]
const swappableToTokens: Token[] = [degenToken, ethToken, usdcToken, wethToken] // [!code focus]

return ( // [!code focus]
<SwapDefault // [!code focus]
from={swappableFromTokens} // [!code focus]
to={swappableToTokens} // [!code focus]
/> // [!code focus]
); // [!code focus]
<SwapDefault // [!code focus]
from={swappableFromTokens} // [!code focus]
to={swappableToTokens} // [!code focus]
/> // [!code focus]
// ---cut-after---
}

Expand Down
6 changes: 3 additions & 3 deletions site/docs/pages/transaction/transaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ If you'd like more customization, follow the implementation guide for our `Swap`

```tsx twoslash
// @noErrors: 2580 2304 - Cannot find name 'process', Cannot find name 'contracts'
import { TransactionDefault } from "@coinbase/onchainkit/transaction"
// ---cut-before---
// omitted for brevity
<TransactionDefault contracts={contracts} />
import { TransactionDefault } from "@coinbase/onchainkit/transaction" // [!code focus]
<TransactionDefault contracts={contracts} /> // [!code focus]
```

<App>
Expand Down
4 changes: 1 addition & 3 deletions site/docs/pages/wallet/wallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ The `WalletDefault` component is a simplified version of the `Wallet` component,
If you'd like more customization, follow the implementation guide for our `Wallet` component below.

```tsx twoslash
import { WalletDefault } from '@coinbase/onchainkit/wallet';

export function WalletComponents() {
return (
// ---cut-before---
// omitted for brevity
import { WalletDefault } from '@coinbase/onchainkit/wallet';

<WalletDefault /> // [!code focus]
// ---cut-after---
Expand Down

0 comments on commit 88d8c20

Please sign in to comment.