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:
parent
258723ea72
commit
0abf5b4f02
3 changed files with 9 additions and 28 deletions
|
|
@ -8,7 +8,6 @@ import { withTracker } from 'meteor/react-meteor-data';
|
|||
import { currentLocationHref } from '/imports/ui/components/Utils/location';
|
||||
import {
|
||||
FacebookShareButton,
|
||||
GooglePlusShareButton,
|
||||
TwitterShareButton,
|
||||
TelegramShareButton,
|
||||
WhatsappShareButton,
|
||||
|
|
@ -16,7 +15,6 @@ import {
|
|||
EmailShareButton,
|
||||
|
||||
FacebookIcon,
|
||||
GooglePlusIcon,
|
||||
TwitterIcon,
|
||||
TelegramIcon,
|
||||
WhatsappIcon,
|
||||
|
|
@ -94,15 +92,6 @@ class ShareIt extends Component {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className="share_it">
|
||||
<GooglePlusShareButton
|
||||
url={shareUrl}
|
||||
className="share_it__share-button"
|
||||
>
|
||||
<GooglePlusIcon size={32} round />
|
||||
</GooglePlusShareButton>
|
||||
</div>
|
||||
|
||||
<div className="share_it">
|
||||
<RedditShareButton
|
||||
url={shareUrl}
|
||||
|
|
@ -135,9 +124,6 @@ ShareIt.propTypes = {
|
|||
title: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
ShareIt.defaultProps = {
|
||||
};
|
||||
|
||||
export default withTranslation()(withTracker((props) => {
|
||||
const { title } = props;
|
||||
return {
|
||||
|
|
|
|||
21
package-lock.json
generated
21
package-lock.json
generated
|
|
@ -75,7 +75,7 @@
|
|||
"react-resize-detector": "^1.1.0",
|
||||
"react-router-bootstrap": "^0.26.3",
|
||||
"react-router-dom": "^6.30.4",
|
||||
"react-share": "^2.0.0",
|
||||
"react-share": "^5.3.0",
|
||||
"simpl-schema": "^1.5.0",
|
||||
"simple-line-icons": "^2.4.1",
|
||||
"store": "^2.0.12",
|
||||
|
|
@ -19807,21 +19807,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/react-share": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-share/-/react-share-2.0.0.tgz",
|
||||
"integrity": "sha512-WlY2nPEg8D3X9/WIJwKcEAlfqNVXbvYJ2nXIjRRQR3GBehQCs1iOrEeRn0KxJxj8AOWmX7k/AmJZLvxtovjVdQ==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/react-share/-/react-share-5.3.0.tgz",
|
||||
"integrity": "sha512-NU4TqizVi2TuyLpN93/ng2ux+uIGHK5b2dT15cHvZDwfi5b5NuzGych4htCGObN8lubygeamhRxUot4lZ0Pv6Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"babel-runtime": "^6.6.1",
|
||||
"classnames": "^2.2.5",
|
||||
"jsonp": "^0.2.1",
|
||||
"prop-types": "^15.5.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0",
|
||||
"npm": ">=3.0.0"
|
||||
"classnames": "^2.3.2",
|
||||
"jsonp": "^0.2.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0-0"
|
||||
"react": "^17 || ^18 || ^19"
|
||||
}
|
||||
},
|
||||
"node_modules/react-stately": {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
"react-resize-detector": "^1.1.0",
|
||||
"react-router-bootstrap": "^0.26.3",
|
||||
"react-router-dom": "^6.30.4",
|
||||
"react-share": "^2.0.0",
|
||||
"react-share": "^5.3.0",
|
||||
"simpl-schema": "^1.5.0",
|
||||
"simple-line-icons": "^2.4.1",
|
||||
"store": "^2.0.12",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue