Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit ca78404

Browse files
committed
feat: add notification
1 parent becf98e commit ca78404

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pages/Content/components/TranslationItem.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const TranslationItem: React.FC<{
2929
const { parentElement } = job
3030

3131
if (!parentElement) {
32+
enqueueSnackbar('已找不到原文', { variant: 'info' })
3233
return
3334
}
3435

@@ -109,6 +110,7 @@ const TranslationItem: React.FC<{
109110
<Clipboard
110111
option-text={() => result}
111112
button-title="复制翻译结果"
113+
onSuccess={() => enqueueSnackbar('复制成功')}
112114
component={IconButton}
113115
className="ate_TranslationItem__copy-button">
114116
<ClipboardCopy />

0 commit comments

Comments
 (0)