Skip to content

Commit d069c1e

Browse files
committed
remove class name
1 parent 53d0e9e commit d069c1e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/codeHighlights/codeHighlights.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import {Children, cloneElement, ReactElement, useEffect, useRef, useState} from 'react';
44
import {Clipboard} from 'react-feather';
55
import styled from '@emotion/styled';
6+
import * as Sentry from '@sentry/nextjs';
67

78
import {cleanCodeSnippet, useCleanSnippetInClipboard} from '../codeBlock';
89

@@ -91,15 +92,15 @@ export function HighlightBlock({
9192
setCopied(true);
9293
setTimeout(() => setCopied(false), 1200);
9394
} catch (error) {
94-
// eslint-disable-next-line no-console
95-
console.error('Failed to copy:', error);
95+
Sentry.captureException(error);
96+
setCopied(false);
9697
}
9798
}
9899

99100
return (
100101
<HighlightBlockContainer>
101102
<CodeLinesContainer ref={codeRef}>{children}</CodeLinesContainer>
102-
<ClipBoardContainer onClick={copyCodeOnClick} className=".clipboard">
103+
<ClipBoardContainer onClick={copyCodeOnClick}>
103104
{showCopyButton && (
104105
<Clipboard
105106
size={16}

0 commit comments

Comments
 (0)