diff options
Diffstat (limited to 'modern/src/RemoveDialog.js')
-rw-r--r-- | modern/src/RemoveDialog.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/RemoveDialog.js b/modern/src/RemoveDialog.js index 4ba5c1e9..6d191d6a 100644 --- a/modern/src/RemoveDialog.js +++ b/modern/src/RemoveDialog.js @@ -4,11 +4,13 @@ import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogContentText from '@material-ui/core/DialogContentText'; -import t from './LocalizationProvider'; +import { useTranslation } from './LocalizationProvider'; const RemoveDialog = ({ open, endpoint, itemId, onResult, }) => { + const t = useTranslation(); + const handleRemove = async () => { const response = await fetch(`/api/${endpoint}/${itemId}`, { method: 'DELETE' }); if (response.ok) { |