File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11'use client' ;
22
33import { useState } from 'react' ;
4- import { Clipboard , Check } from 'react-feather' ;
4+ import { Check , Clipboard } from 'react-feather' ;
5+ import * as Sentry from '@sentry/nextjs' ;
56
67interface Props {
78 /** Absolute path to the markdown version of this page (e.g. `/docs/page.md`) */
@@ -24,7 +25,7 @@ export function CopyForLLMButton({markdownPath}: Props) {
2425 }
2526 } catch ( err ) {
2627 // network error handled below in fallback
27- console . error ( err ) ;
28+ Sentry . captureException ( err ) ;
2829 }
2930
3031 // Fallback: copy the markdown URL if first attempt failed
@@ -33,7 +34,7 @@ export function CopyForLLMButton({markdownPath}: Props) {
3334 await navigator . clipboard . writeText ( window . location . origin + markdownPath ) ;
3435 didCopy = true ;
3536 } catch ( err ) {
36- console . error ( 'Failed to copy markdown URL as fallback' , err ) ;
37+ Sentry . captureException ( err ) ;
3738 }
3839 }
3940
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import './type.scss';
1414import { Banner } from '../banner' ;
1515import { Breadcrumbs } from '../breadcrumbs' ;
1616import { CodeContextProvider } from '../codeContext' ;
17+ import { CopyForLLMButton } from '../copyForLLMButton' ;
1718import { DocFeedback } from '../docFeedback' ;
1819import { GitHubCTA } from '../githubCTA' ;
1920import { Header } from '../header' ;
@@ -23,7 +24,6 @@ import {PlatformSdkDetail} from '../platformSdkDetail';
2324import { Sidebar } from '../sidebar' ;
2425import { SidebarTableOfContents } from '../sidebarTableOfContents' ;
2526import { ReaderDepthTracker } from '../track-reader-depth' ;
26- import { CopyForLLMButton } from '../copyForLLMButton' ;
2727
2828type Props = {
2929 children : ReactNode ;
You can’t perform that action at this time.
0 commit comments