deps: react-share 2 -> 5 (drops its defaultProps warnings)

react-share 2.0 shipped function components with defaultProps (CreatedButton,
Icon) -> React-19-blocking warnings on fire-detail pages. v5 is React-18-safe
and drops them. Removed the GooglePlusShareButton/Icon (Google+ is dead;
removed from react-share in v4+); the other 6 buttons (Facebook, Twitter,
Telegram, WhatsApp, Reddit, Email) are API-compatible. Browser-verified 6
buttons render, no defaultProps warnings. REST smoke byte-identical.
This commit is contained in:
vjrj 2026-07-21 14:14:48 +02:00
parent 258723ea72
commit 0abf5b4f02
3 changed files with 9 additions and 28 deletions

View file

@ -8,7 +8,6 @@ import { withTracker } from 'meteor/react-meteor-data';
import { currentLocationHref } from '/imports/ui/components/Utils/location'; import { currentLocationHref } from '/imports/ui/components/Utils/location';
import { import {
FacebookShareButton, FacebookShareButton,
GooglePlusShareButton,
TwitterShareButton, TwitterShareButton,
TelegramShareButton, TelegramShareButton,
WhatsappShareButton, WhatsappShareButton,
@ -16,7 +15,6 @@ import {
EmailShareButton, EmailShareButton,
FacebookIcon, FacebookIcon,
GooglePlusIcon,
TwitterIcon, TwitterIcon,
TelegramIcon, TelegramIcon,
WhatsappIcon, WhatsappIcon,
@ -94,15 +92,6 @@ class ShareIt extends Component {
</div> </div>
</div> </div>
<div className="share_it">
<GooglePlusShareButton
url={shareUrl}
className="share_it__share-button"
>
<GooglePlusIcon size={32} round />
</GooglePlusShareButton>
</div>
<div className="share_it"> <div className="share_it">
<RedditShareButton <RedditShareButton
url={shareUrl} url={shareUrl}
@ -135,9 +124,6 @@ ShareIt.propTypes = {
title: PropTypes.string.isRequired title: PropTypes.string.isRequired
}; };
ShareIt.defaultProps = {
};
export default withTranslation()(withTracker((props) => { export default withTranslation()(withTracker((props) => {
const { title } = props; const { title } = props;
return { return {

21
package-lock.json generated
View file

@ -75,7 +75,7 @@
"react-resize-detector": "^1.1.0", "react-resize-detector": "^1.1.0",
"react-router-bootstrap": "^0.26.3", "react-router-bootstrap": "^0.26.3",
"react-router-dom": "^6.30.4", "react-router-dom": "^6.30.4",
"react-share": "^2.0.0", "react-share": "^5.3.0",
"simpl-schema": "^1.5.0", "simpl-schema": "^1.5.0",
"simple-line-icons": "^2.4.1", "simple-line-icons": "^2.4.1",
"store": "^2.0.12", "store": "^2.0.12",
@ -19807,21 +19807,16 @@
} }
}, },
"node_modules/react-share": { "node_modules/react-share": {
"version": "2.0.0", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/react-share/-/react-share-2.0.0.tgz", "resolved": "https://registry.npmjs.org/react-share/-/react-share-5.3.0.tgz",
"integrity": "sha512-WlY2nPEg8D3X9/WIJwKcEAlfqNVXbvYJ2nXIjRRQR3GBehQCs1iOrEeRn0KxJxj8AOWmX7k/AmJZLvxtovjVdQ==", "integrity": "sha512-NU4TqizVi2TuyLpN93/ng2ux+uIGHK5b2dT15cHvZDwfi5b5NuzGych4htCGObN8lubygeamhRxUot4lZ0Pv6Q==",
"license": "MIT",
"dependencies": { "dependencies": {
"babel-runtime": "^6.6.1", "classnames": "^2.3.2",
"classnames": "^2.2.5", "jsonp": "^0.2.1"
"jsonp": "^0.2.1",
"prop-types": "^15.5.8"
},
"engines": {
"node": ">=4.0.0",
"npm": ">=3.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0-0" "react": "^17 || ^18 || ^19"
} }
}, },
"node_modules/react-stately": { "node_modules/react-stately": {

View file

@ -75,7 +75,7 @@
"react-resize-detector": "^1.1.0", "react-resize-detector": "^1.1.0",
"react-router-bootstrap": "^0.26.3", "react-router-bootstrap": "^0.26.3",
"react-router-dom": "^6.30.4", "react-router-dom": "^6.30.4",
"react-share": "^2.0.0", "react-share": "^5.3.0",
"simpl-schema": "^1.5.0", "simpl-schema": "^1.5.0",
"simple-line-icons": "^2.4.1", "simple-line-icons": "^2.4.1",
"store": "^2.0.12", "store": "^2.0.12",