From bbbd1f7356e98dd20179c007e903f2db68819477 Mon Sep 17 00:00:00 2001 From: gregory1996 Date: Tue, 19 Mar 2024 13:09:51 +0200 Subject: [PATCH] Add warning text messages to en.json --- src/components/Layout.js | 20 +++++++++++++++++--- src/locales/en.json | 18 +++++++++++++----- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/components/Layout.js b/src/components/Layout.js index 6ffd0aa40..60b89bba8 100644 --- a/src/components/Layout.js +++ b/src/components/Layout.js @@ -1,11 +1,12 @@ import React, { useState, useEffect } from 'react'; import Sidebar from './Sidebar'; import { GiHamburgerMenu } from 'react-icons/gi'; -import { FaExclamationTriangle, FaTimes } from 'react-icons/fa'; // Import the icons you want to use +import { FaExclamationTriangle, FaTimes } from 'react-icons/fa'; import logo from '../assets/images/wallet_white.png'; import { useLocation, useNavigate } from 'react-router-dom'; import { CSSTransition } from 'react-transition-group'; import { useSessionStorage } from '../components/useStorage'; +import { useTranslation } from 'react-i18next'; const Layout = ({ children, isPermissionGranted, tokenSentInSession }) => { const location = useLocation(); @@ -15,6 +16,7 @@ const Layout = ({ children, isPermissionGranted, tokenSentInSession }) => { const toggleSidebar = () => setIsOpen(!isOpen); const [isMessageNoGrantedVisible, setIsMessageNoGrantedVisible] = useSessionStorage('isMessageNoGrantedVisible', null); const [isMessageGrantedVisible, setIsMessageGrantedVisible] = useSessionStorage('isMessageGrantedVisible', null); + const { t } = useTranslation(); const handleNavigate = (path) => { if (location.pathname === path) { @@ -88,7 +90,11 @@ const Layout = ({ children, isPermissionGranted, tokenSentInSession }) => { <>

- To receive real-time updates of Credentials, reset or allow notifications permission. + {t('layout.messageAllowPermissionPart1')} + { + t('layout.messageAllowPermissionPart2')} + + .