yangdx
commited on
Commit
·
b8ab737
1
Parent(s):
6da6311
fix: add missing `t` dependency in ClearDocumentsDialog useCallback
Browse files
lightrag_webui/src/components/documents/ClearDocumentsDialog.tsx
CHANGED
@@ -31,7 +31,7 @@ export default function ClearDocumentsDialog() {
|
|
31 |
} catch (err) {
|
32 |
toast.error(t('documentPanel.clearDocuments.error', { error: errorMessage(err) }))
|
33 |
}
|
34 |
-
}, [setOpen])
|
35 |
|
36 |
return (
|
37 |
<Dialog open={open} onOpenChange={setOpen}>
|
@@ -46,7 +46,7 @@ export default function ClearDocumentsDialog() {
|
|
46 |
<DialogDescription>{t('documentPanel.clearDocuments.confirm')}</DialogDescription>
|
47 |
</DialogHeader>
|
48 |
<Button variant="destructive" onClick={handleClear}>
|
49 |
-
|
50 |
</Button>
|
51 |
</DialogContent>
|
52 |
</Dialog>
|
|
|
31 |
} catch (err) {
|
32 |
toast.error(t('documentPanel.clearDocuments.error', { error: errorMessage(err) }))
|
33 |
}
|
34 |
+
}, [setOpen, t])
|
35 |
|
36 |
return (
|
37 |
<Dialog open={open} onOpenChange={setOpen}>
|
|
|
46 |
<DialogDescription>{t('documentPanel.clearDocuments.confirm')}</DialogDescription>
|
47 |
</DialogHeader>
|
48 |
<Button variant="destructive" onClick={handleClear}>
|
49 |
+
{t('documentPanel.clearDocuments.confirmButton')}
|
50 |
</Button>
|
51 |
</DialogContent>
|
52 |
</Dialog>
|