React 19 drops defaultProps on function components. Converted the 9 of
ours that used it (App, Navigation, ReSendEmail, Reconnect, OAuthLoginButton,
PageHeader, Page, EditDocument, EditSubscription) to destructured default
params; App defaults userId/emailAddress in its withTracker instead (it
spreads {...props} widely). Class components keep defaultProps (still
supported). The only defaultProps warnings left are from the react-share
npm package (CreatedButton/Icon), not our code. REST smoke byte-identical.
38 lines
1 KiB
JavaScript
38 lines
1 KiB
JavaScript
/* eslint-disable react/jsx-indent-props */
|
|
/* eslint-disable import/no-absolute-path */
|
|
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { withTranslation } from 'react-i18next';
|
|
/* import { Meteor } from 'meteor/meteor';
|
|
import { Tracker } from 'meteor/tracker'; */
|
|
import Blaze from 'meteor/gadicc:blaze-react-component';
|
|
|
|
const Reconnect = ({ t, authenticated }) => (
|
|
<div>
|
|
{ true && /* !authenticated && */
|
|
<Blaze
|
|
template="meteorStatus"
|
|
textDisconnect={t('Desconectado del servidor, reconectando en %delay% segundos.')}
|
|
textConnecting={t('Desconectado del servidor, reconectando...')}
|
|
linkText={t('Reintentar ahora')}
|
|
/> }
|
|
</div>
|
|
);
|
|
|
|
Reconnect.propTypes = {
|
|
t: PropTypes.func.isRequired,
|
|
authenticated: PropTypes.bool.isRequired
|
|
};
|
|
|
|
export default withTranslation()(Reconnect);
|
|
|
|
/*
|
|
if (!Meteor.isProduction) {
|
|
// We clear the console on disconnect during development
|
|
Tracker.autorun(() => {
|
|
if (Meteor.status().status === 'waiting') {
|
|
console.clear();
|
|
}
|
|
});
|
|
} */
|