Fix success message when copying text

This commit is contained in:
Jackson Harper
2023-08-07 11:03:13 +08:00
parent 053625276b
commit 46adb89682

View File

@ -479,9 +479,12 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
if (textToCopy) {
try {
await navigator.clipboard.writeText(textToCopy)
showSuccessToast('Highlight copied', {
position: 'bottom-right',
})
showSuccessToast(
focusedHighlight ? 'Highlight copied' : 'Text copied',
{
position: 'bottom-right',
}
)
} catch (error) {
showErrorToast('Error copying highlight, permission denied.', {
position: 'bottom-right',