Skip to content

Commit

Permalink
fix: try fix copy
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Oct 9, 2023
1 parent 9f6ed44 commit 28ce0c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/app/pages/receive/receive-btc.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useCallback } from 'react';
import toast from 'react-hot-toast';
import { useLocation } from 'react-router-dom';

Expand Down Expand Up @@ -29,11 +28,11 @@ export function ReceiveBtcModal({ type = 'btc' }: ReceiveBtcModalType) {

const { onCopy } = useClipboard(btcAddress);

const copyToClipboard = useCallback(() => {
function copyToClipboard() {
void analytics.track('copy_btc_address_to_clipboard');
toast.success('Copied to clipboard!');
onCopy();
}, [analytics, onCopy]);
}

return (
<ReceiveTokensLayout
Expand Down
7 changes: 3 additions & 4 deletions src/app/pages/receive/receive-stx.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useCallback } from 'react';
import toast from 'react-hot-toast';

import { useClipboard } from '@stacks/ui';
Expand All @@ -17,11 +16,11 @@ export function ReceiveStxModal() {
const { onCopy } = useClipboard(currentAccount?.address ?? '');
const accountName = useCurrentAccountDisplayName();

const copyToClipboard = useCallback(() => {
function copyToClipboard() {
void analytics.track('copy_stx_address_to_clipboard');
toast.success('Copied to clipboard!');
toast.success('Copied to clipboard');
onCopy();
}, [analytics, onCopy]);
}

if (!currentAccount) return null;

Expand Down

0 comments on commit 28ce0c3

Please sign in to comment.