Merge pull request #2610 from omnivore-app/fix/web-copy-typo

Fix success message when copying text
This commit is contained in:
Jackson Harper 2023-08-07 11:27:49 +08:00 committed by GitHub
commit c7bb871b7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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',