From 2533debcca700ce0cf822c1563c95455bd439b8d Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Sun, 22 Sep 2024 19:35:30 -0400 Subject: [PATCH] Removed @Radium decorator in favour of manually wrapped class components. This easily side-steps issue of custom decorator not working in Storybook. (cherry picked from commit 8617fd642197f7063623914b1a96b79bbe20d0fc) --- client-admin/src/components/conversation-admin/seed-tweet.js | 2 +- client-report/src/COMPONENT_TEMPLATE.js | 2 +- client-report/src/components/comment.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client-admin/src/components/conversation-admin/seed-tweet.js b/client-admin/src/components/conversation-admin/seed-tweet.js index bde75e479..9e0cd4fd2 100644 --- a/client-admin/src/components/conversation-admin/seed-tweet.js +++ b/client-admin/src/components/conversation-admin/seed-tweet.js @@ -22,7 +22,6 @@ const styles = { } @connect((state) => state.seed_comments_tweet) -@Radium class ModerateCommentsSeed extends React.Component { constructor(props) { super(props) @@ -134,6 +133,7 @@ ModerateCommentsSeed.propTypes = { }) } +ModerateCommentsSeed = Radium(ModerateCommentsSeed) export default ModerateCommentsSeed /* diff --git a/client-report/src/COMPONENT_TEMPLATE.js b/client-report/src/COMPONENT_TEMPLATE.js index 5ff28037f..642348814 100644 --- a/client-report/src/COMPONENT_TEMPLATE.js +++ b/client-report/src/COMPONENT_TEMPLATE.js @@ -12,7 +12,6 @@ import PropTypes from "prop-types"; // @connect(state => { // return state.FOO; // }) -@Radium class ComponentName extends React.Component { constructor(props) { super(props); @@ -52,6 +51,7 @@ class ComponentName extends React.Component { } } +ComponentName = Radium(ComponentName); export default ComponentName; /* diff --git a/client-report/src/components/comment.js b/client-report/src/components/comment.js index 064802fce..782407e89 100644 --- a/client-report/src/components/comment.js +++ b/client-report/src/components/comment.js @@ -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, @@ -74,6 +73,7 @@ class Comment extends React.Component { } } + Comment = Radium(Comment); export default Comment; //

{this.props.comment.demographics.gender}