Skip to content

Commit

Permalink
Revert "Fix incorrect proptypes from react-router-v5 update (mastodon…
Browse files Browse the repository at this point in the history
…#27507)"

This reverts commit 0ad6617.
  • Loading branch information
zunda committed Oct 23, 2023
1 parent 67cb567 commit 7bccac7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/javascript/mastodon/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { HotKeys } from 'react-hotkeys';

import { Icon } from 'mastodon/components/icon';
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
import { withOptionalRouter, WithOptionalRouterPropTypes } from 'mastodon/utils/react_router';
import { withOptionalRouter, WithRouterPropTypes } from 'mastodon/utils/react_router';

import Card from '../features/status/components/card';
// We use the component (and not the container) since we do not want
Expand Down Expand Up @@ -113,7 +113,7 @@ class Status extends ImmutablePureComponent {
inUse: PropTypes.bool,
available: PropTypes.bool,
}),
...WithOptionalRouterPropTypes,
...WithRouterPropTypes,
};

// Avoid checking props that are functions (and whose equality will always
Expand Down
1 change: 0 additions & 1 deletion app/javascript/mastodon/utils/react_router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export function withOptionalRouter(Component) {
C.displayName = displayName;
C.WrappedComponent = Component;
C.propTypes = {
...Component.propTypes,
wrappedComponentRef: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
Expand Down

0 comments on commit 7bccac7

Please sign in to comment.