Reconnect only for anon users
This commit is contained in:
parent
2bad9d4083
commit
58c557ecb2
1 changed files with 10 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
/* eslint-disable react/jsx-indent-props */
|
/* eslint-disable react/jsx-indent-props */
|
||||||
/* eslint-disable import/no-absolute-path */
|
/* eslint-disable import/no-absolute-path */
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Fragment, Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { translate } from 'react-i18next';
|
import { translate } from 'react-i18next';
|
||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
|
|
@ -10,20 +10,25 @@ import Blaze from 'meteor/gadicc:blaze-react-component';
|
||||||
|
|
||||||
class Reconnect extends Component {
|
class Reconnect extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { t } = this.props;
|
const { t, authenticated } = this.props;
|
||||||
|
// console.log(`Reconnect ${!authenticated ? 'enabled' : 'disabled'}`);
|
||||||
return (
|
return (
|
||||||
<Blaze
|
<Fragment>
|
||||||
|
{ !authenticated &&
|
||||||
|
<Blaze
|
||||||
template="meteorStatus"
|
template="meteorStatus"
|
||||||
textDisconnect={t('Desconectado del servidor, reconectando en %delay% segundos.')}
|
textDisconnect={t('Desconectado del servidor, reconectando en %delay% segundos.')}
|
||||||
textConnecting={t('Desconectado del servidor, reconectando...')}
|
textConnecting={t('Desconectado del servidor, reconectando...')}
|
||||||
linkText={t('Reintentar ahora')}
|
linkText={t('Reintentar ahora')}
|
||||||
/>
|
/> }
|
||||||
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Reconnect.propTypes = {
|
Reconnect.propTypes = {
|
||||||
t: PropTypes.func.isRequired
|
t: PropTypes.func.isRequired,
|
||||||
|
authenticated: PropTypes.bool.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
Reconnect.defaultProps = {
|
Reconnect.defaultProps = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue