import { i18n } from 'arm-common'; import agui from 'arm-gui'; import React, { useCallback } from 'react'; import { connect } from 'react-redux'; const getI18n = (code, desc, ...args) => i18n(`ADV.SESSION_EXPIRED.${code}`, desc, ...args) export default function SessionExpired(props) { const { sessionExpired } = props; const reload = useCallback(() => { location.reload(); }, [history]) return ( {getI18n('EXPIRED_SESSION', 'Sessione scaduta')}

{getI18n('USER_DISCONNECTED', 'Utente disconnesso.')}
{getI18n('EXPIRED_SESSION_MESSAGE', 'Per riconnettersi premere il tasto "Ricarica" oppure ricaricare la pagina.')}

{getI18n('RELOAD', 'Ricarica')} ); } const mapStateToProps = (state) => ({ sessionExpired: state.account.sessionExpired }) SessionExpired = connect(mapStateToProps)(SessionExpired);