Skip to content

Commit

Permalink
feat: add use client directives to swap components
Browse files Browse the repository at this point in the history
  • Loading branch information
roushou committed Jun 20, 2024
1 parent d58ce10 commit 27e0ac3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-bottles-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@coinbase/onchainkit": patch
---

feat: add `use client` directives to swap components
2 changes: 2 additions & 0 deletions src/swap/components/Swap.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { Children, useCallback, useMemo, useState } from 'react';
import { SwapAmountInput } from './SwapAmountInput';
import { SwapButton } from './SwapButton';
Expand Down
2 changes: 2 additions & 0 deletions src/swap/components/SwapAmountInput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useCallback, useEffect, useMemo } from 'react';

import { useSwapContext } from '../context';
Expand Down
2 changes: 2 additions & 0 deletions src/swap/components/SwapButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useCallback } from 'react';
import { useSwapContext } from '../context';
import { buildSwapTransaction } from '../core/buildSwapTransaction';
Expand Down
2 changes: 2 additions & 0 deletions src/swap/components/SwapMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useSwapContext } from '../context';
import { text } from '../../styles/theme';
import { getSwapMessage } from '../core/getSwapMessage';
Expand Down
2 changes: 2 additions & 0 deletions src/swap/components/SwapToggleButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { cn, pressable } from '../../styles/theme';
import { useSwapContext } from '../context';

Expand Down

0 comments on commit 27e0ac3

Please sign in to comment.