add i18n for the notifications dropdown menu in the list.
This commit is contained in:
1 file changed
+4
-3
@@ -9,13 +9,14 @@ import { useState } from "react";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const ActionMenu = ({ notification, onDelete }) => {
|
const ActionMenu = ({ notification, onDelete }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [anchorEl, setAnchorEl] = useState(null);
|
const [anchorEl, setAnchorEl] = useState(null);
|
||||||
const open = Boolean(anchorEl);
|
const open = Boolean(anchorEl);
|
||||||
|
const { t } = useTranslation();
|
||||||
// Handlers
|
// Handlers
|
||||||
const handleClick = (event) => {
|
const handleClick = (event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@@ -59,12 +60,12 @@ const ActionMenu = ({ notification, onDelete }) => {
|
|||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
onMouseDown={(e) => e.stopPropagation()}
|
onMouseDown={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<MenuItem onClick={handleConfigure}>Configure</MenuItem>
|
<MenuItem onClick={handleConfigure}>{t("configure", "Configure")}</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={handleRemove}
|
onClick={handleRemove}
|
||||||
sx={{ "&.MuiButtonBase-root": { color: theme.palette.error.main } }}
|
sx={{ "&.MuiButtonBase-root": { color: theme.palette.error.main } }}
|
||||||
>
|
>
|
||||||
Remove
|
{t("delete", "Delete")}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in new issue
Block a user