(status: CopyStatus)
| 11 | } |
| 12 | |
| 13 | const copyLabel = (status: CopyStatus) => { |
| 14 | if (status === 'copied') return 'Copied Markdown'; |
| 15 | if (status === 'failed') return 'Copy failed'; |
| 16 | return 'Copy Markdown'; |
| 17 | }; |
| 18 | |
| 19 | export const PageActions = ({ markdownUrl }: PageActionsProps) => { |
| 20 | const [copyStatus, setCopyStatus] = useState<CopyStatus>('idle'); |