import React, { useState } from 'react'; import QRCode from 'react-qr-code'; import { TextP } from '../styles/App-styles'; import { Box, Typography } from '@mui/material'; import { useTranslation } from 'react-i18next'; export const AddressQRCode = ({ targetAddress }) => { const [open, setOpen] = useState(false); const { t } = useTranslation(['auth', 'core', 'group', 'question']); return ( { setOpen((prev) => !prev); }} > {open ? t('core:action.hide_qr_code', { postProcess: 'capitalizeFirstChar', }) : t('core:action.see_qr_code', { postProcess: 'capitalizeFirstChar', })} {open && ( {t('core:address_your', { postProcess: 'capitalizeFirstChar' })} )} ); };