deps: react-helmet -> react-helmet-async 2
react-helmet 5 is unmaintained and breaks under React 18 StrictMode. Same <Helmet> API in the 15 pages; HelmetProvider wraps <App/> in the client entry. Browser-verified: per-page titles, meta description and hreflang alternates all inject. REST smoke byte-identical.
This commit is contained in:
parent
f51acf4d78
commit
f1eae84e25
19 changed files with 47 additions and 93 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/* global */
|
||||
import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { HelmetProvider } from 'react-helmet-async';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import '/imports/startup/client/modernizr';
|
||||
import App from '../../ui/layouts/App/App';
|
||||
|
|
@ -15,5 +16,9 @@ else {
|
|||
Modernizr.on('webp', (result) => {
|
||||
if (Meteor.isDevelopment) console.log(`webp ${result ? '' : 'not '}supported`);
|
||||
});
|
||||
Meteor.startup(() => createRoot(document.getElementById('react-root')).render(<App />));
|
||||
Meteor.startup(() => createRoot(document.getElementById('react-root')).render(
|
||||
<HelmetProvider>
|
||||
<App />
|
||||
</HelmetProvider>
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|||
import { Router, Switch, Route } from 'react-router-dom';
|
||||
import { Grid } from 'react-bootstrap';
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { withTracker } from 'meteor/react-meteor-data';
|
||||
// https://github.com/gadicc/meteor-blaze-react-component/
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { translate, Trans } from 'react-i18next';
|
|||
import { Row, Col, Alert, FormGroup } from 'react-bootstrap';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { Map, GeoJSON } from 'react-leaflet';
|
||||
import { rectangleAround } from 'map-common-utils';
|
||||
import DefMapLayers from '/imports/ui/components/Maps/DefMapLayers';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { Meteor } from 'meteor/meteor';
|
|||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { withTracker } from 'meteor/react-meteor-data';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { Trans, translate } from 'react-i18next';
|
||||
import { Map } from 'react-leaflet';
|
||||
import Control from 'react-leaflet-control';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
import 'simple-line-icons/css/simple-line-icons.css';
|
||||
import React, { Component } from 'react';
|
||||
import { translate, Trans } from 'react-i18next';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import PropTypes from 'prop-types';
|
||||
// import { Link } from 'react-router-dom';
|
||||
// https://www.npmjs.com/package/react-resize-detector
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { Row, FormGroup, ControlLabel, Button } from 'react-bootstrap';
|
|||
import { Link } from 'react-router-dom';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { translate } from 'react-i18next';
|
||||
import { T9n } from 'meteor-accounts-t9n';
|
||||
import { testId } from '/imports/ui/components/Utils/TestUtils';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import Icon from '../../components/Icon/Icon';
|
||||
import { translate, Trans } from 'react-i18next';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
|
||||
import './Logout.scss';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { Alert } from 'react-bootstrap';
|
||||
import { translate, Trans } from 'react-i18next';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
|
||||
const NotFound = () => (
|
||||
<div className="NotFound">
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { ReactiveVar } from 'meteor/reactive-var';
|
|||
import i18n from '/imports/startup/client/i18n';
|
||||
import PageHeader from '../../components/PageHeader/PageHeader';
|
||||
import Content from '../../components/Content/Content';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
|
||||
import './Page.scss';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|||
import { Link } from 'react-router-dom';
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import AccountPageFooter from '../../components/AccountPageFooter/AccountPageFooter';
|
||||
import validate from '../../../modules/validate';
|
||||
import { translate } from 'react-i18next';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { Row, Alert, FormGroup, ControlLabel, Button } from 'react-bootstrap';
|
|||
import Col from '../../components/Col/Col';
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import validate from '../../../modules/validate';
|
||||
import { translate } from 'react-i18next';
|
||||
import { T9n } from 'meteor-accounts-t9n';
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { Accounts } from 'meteor/accounts-base';
|
|||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { translate, Trans } from 'react-i18next';
|
||||
import { T9n } from 'meteor-accounts-t9n';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { testId } from '/imports/ui/components/Utils/TestUtils';
|
||||
import Col from '../../components/Col/Col';
|
||||
import Icon from '../../components/Icon/Icon';
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|||
import { translate } from 'react-i18next';
|
||||
import { withTracker } from 'meteor/react-meteor-data';
|
||||
import Blaze from 'meteor/gadicc:blaze-react-component';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
|
||||
/*
|
||||
https://github.com/meteor/docs/blob/version-NEXT/long-form/oplog-observe-driver.md
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { Meteor } from 'meteor/meteor';
|
|||
import { withTracker } from 'meteor/react-meteor-data';
|
||||
import { Trans, translate } from 'react-i18next';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import UserSubsToFiresCollection from '/imports/api/Subscriptions/Subscriptions';
|
||||
import SelectionMap, { action } from '/imports/ui/components/SelectionMap/SelectionMap';
|
||||
import confirm from '/imports/ui/components/Prompt/Confirm';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { Meteor } from 'meteor/meteor';
|
|||
import { withTracker } from 'meteor/react-meteor-data';
|
||||
import { Trans, translate } from 'react-i18next';
|
||||
import { Map } from 'react-leaflet';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import L from 'leaflet';
|
||||
import 'leaflet/dist/leaflet.css';
|
||||
import 'leaflet-graphicscale/dist/Leaflet.GraphicScale.min.css';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { Alert } from 'react-bootstrap';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { translate } from 'react-i18next';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue