Skip to content

Commit

Permalink
Removed @radium decorator in favour of manually wrapped class compone…
Browse files Browse the repository at this point in the history
…nts.

This easily side-steps issue of custom decorator not working in Storybook.

(cherry picked from commit 8617fd6)
  • Loading branch information
patcon authored and thomassth committed Dec 3, 2024
1 parent 518ec21 commit 2533deb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const styles = {
}

@connect((state) => state.seed_comments_tweet)
@Radium
class ModerateCommentsSeed extends React.Component {
constructor(props) {
super(props)
Expand Down Expand Up @@ -134,6 +133,7 @@ ModerateCommentsSeed.propTypes = {
})
}

ModerateCommentsSeed = Radium(ModerateCommentsSeed)

Check failure on line 136 in client-admin/src/components/conversation-admin/seed-tweet.js

View workflow job for this annotation

GitHub Actions / eslint

'ModerateCommentsSeed' is a class
export default ModerateCommentsSeed

/*
Expand Down
2 changes: 1 addition & 1 deletion client-report/src/COMPONENT_TEMPLATE.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import PropTypes from "prop-types";
// @connect(state => {
// return state.FOO;
// })
@Radium
class ComponentName extends React.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -52,6 +51,7 @@ class ComponentName extends React.Component {
}
}

ComponentName = Radium(ComponentName);
export default ComponentName;

/*
Expand Down
2 changes: 1 addition & 1 deletion client-report/src/components/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Flex from "./flex";
import * as globals from "./globals";
import BarChart from "./barChart";

@Radium
class Comment extends React.Component {
static propTypes = {
dispatch: PropTypes.func,
Expand Down Expand Up @@ -74,6 +73,7 @@ class Comment extends React.Component {
}
}

Comment = Radium(Comment);
export default Comment;

// <p>{this.props.comment.demographics.gender}</p>
Expand Down

0 comments on commit 2533deb

Please sign in to comment.