From a4987f29471309b6b26c150d20695b5abcc4ea3a Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 21 Mar 2018 16:48:28 +0100 Subject: [PATCH] Less deprecation messages --- .../coral-embed-stream/src/actions/stream.js | 40 ++++++------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/client/coral-embed-stream/src/actions/stream.js b/client/coral-embed-stream/src/actions/stream.js index f3d3897ee..0f43ffe10 100644 --- a/client/coral-embed-stream/src/actions/stream.js +++ b/client/coral-embed-stream/src/actions/stream.js @@ -1,7 +1,6 @@ import * as actions from '../constants/stream'; import { buildUrl } from 'coral-framework/utils/url'; import queryString from 'query-string'; -import once from 'lodash/once'; export const setActiveReplyBox = id => ({ type: actions.SET_ACTIVE_REPLY_BOX, @@ -73,31 +72,18 @@ export const setActiveTab = tab => dispatch => { }; // @Deprecated -const showOldTagsWarningOnce = once(() => { - if (process.env.NODE_ENV !== 'production') { - console.warn( - '`addCommentBoxTag`, `removeCommentBoxTag`, `clearCommentBoxTags` are deprecated. Please switch to `onInputChange`, `input.tags` instead' - ); - } +export const addCommentBoxTag = tag => ({ + type: actions.ADD_COMMENT_BOX_TAG, + tag, }); -export const addCommentBoxTag = tag => { - showOldTagsWarningOnce(); - return { - type: actions.ADD_COMMENT_BOX_TAG, - tag, - }; -}; -export const removeCommentBoxTag = idx => { - showOldTagsWarningOnce(); - return { - type: actions.REMOVE_COMMENT_BOX_TAG, - idx, - }; -}; -export const clearCommentBoxTags = () => { - showOldTagsWarningOnce(); - return { - type: actions.CLEAR_COMMENT_BOX_TAGS, - }; -}; +// @Deprecated +export const removeCommentBoxTag = idx => ({ + type: actions.REMOVE_COMMENT_BOX_TAG, + idx, +}); + +// @Deprecated +export const clearCommentBoxTags = () => ({ + type: actions.CLEAR_COMMENT_BOX_TAGS, +});