1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

F #5422: Add translate component to notifications (#2062)

This commit is contained in:
Sergio Betanzos 2022-05-19 13:07:48 +02:00 committed by GitHub
parent 5dc1e3a6fd
commit 77556f1b8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,7 @@ import { IconButton } from '@mui/material'
import { Cancel as CloseIcon } from 'iconoir-react'
import { useGeneral, useGeneralApi } from 'client/features/General'
import { Translate } from 'client/components/HOC'
const CloseButton = ({ handleClick }) => (
<IconButton onClick={handleClick} component="span">
@ -56,7 +57,7 @@ const Notifier = () => {
if (displayed.includes(key)) return
enqueueSnackbar(message, {
enqueueSnackbar(<Translate word={message} />, {
key,
...options,
action: CloseButton({ handleClick: () => closeSnackbar(key) }),