@capillarytech/creatives-library 2.0.20 → 2.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,12 +6,15 @@ import {
|
|
|
6
6
|
import { injectIntl } from 'react-intl';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import {isEmpty} from 'lodash';
|
|
9
|
+
import { connect } from 'react-redux';
|
|
10
|
+
import { bindActionCreators } from 'redux';
|
|
9
11
|
import SlideBoxContent from './SlideBoxContent';
|
|
10
12
|
import SlideBoxHeader from './SlideBoxHeader';
|
|
11
13
|
import SlideBoxFooter from './SlideBoxFooter';
|
|
12
14
|
import * as constants from './constants';
|
|
13
15
|
import './index.scss';
|
|
14
|
-
|
|
16
|
+
import * as templateActions from '../Templates/actions';
|
|
17
|
+
import * as globalActions from '../Cap/actions';
|
|
15
18
|
|
|
16
19
|
const classPrefix = 'add-creatives-section';
|
|
17
20
|
class Creatives extends React.Component {
|
|
@@ -26,6 +29,8 @@ class Creatives extends React.Component {
|
|
|
26
29
|
}
|
|
27
30
|
componentWillUnmount() {
|
|
28
31
|
console.log("unmounting creatives");
|
|
32
|
+
this.props.templateActions.resetTemplateStoreData();
|
|
33
|
+
this.props.globalActions.clearMetaEntities();
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
|
|
@@ -158,7 +163,7 @@ class Creatives extends React.Component {
|
|
|
158
163
|
toggleShowSlideBox={this.toggleShowSlideBox}
|
|
159
164
|
showSlideBox={showSlideBox}
|
|
160
165
|
isFullMode={isFullMode}
|
|
161
|
-
currentChannel={currentChannel}
|
|
166
|
+
currentChannel={currentChannel.toUpperCase()}
|
|
162
167
|
onChannelChange={this.onChannelChange}
|
|
163
168
|
/>
|
|
164
169
|
}
|
|
@@ -189,5 +194,13 @@ Creatives.propTypes = {
|
|
|
189
194
|
templateData: PropTypes.object,
|
|
190
195
|
isFullMode: PropTypes.bool,
|
|
191
196
|
channel: PropTypes.string,
|
|
197
|
+
templateActions: PropTypes.object,
|
|
198
|
+
globalActions: PropTypes.object,
|
|
192
199
|
};
|
|
193
|
-
|
|
200
|
+
function mapDispatchToProps(dispatch) {
|
|
201
|
+
return {
|
|
202
|
+
templateActions: bindActionCreators(templateActions, dispatch),
|
|
203
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export default connect(null, mapDispatchToProps)(injectIntl(Creatives));
|