Skip to content

Commit

Permalink
remove copying status
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-i committed Jan 25, 2024
1 parent d6311e0 commit fc679ac
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/jupyter-ai/src/components/copy-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import { Box, Button } from '@mui/material';

enum CopyStatus {
None,
Copying,
Copied
}

const COPYBTN_TEXT_BY_STATUS: Record<CopyStatus, string> = {
[CopyStatus.None]: 'Copy to Clipboard',
[CopyStatus.Copying]: 'Copying …',
[CopyStatus.Copied]: 'Copied!'
};

Expand All @@ -22,7 +20,6 @@ export function CopyButton(props: CopyButtonProps): JSX.Element {
const [copyStatus, setCopyStatus] = useState<CopyStatus>(CopyStatus.None);

const copy = useCallback(async () => {
setCopyStatus(CopyStatus.Copying);
try {
await navigator.clipboard.writeText(props.value);
} catch (err) {
Expand Down

0 comments on commit fc679ac

Please sign in to comment.