@capillarytech/creatives-library 7.10.67 → 7.10.68
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.
package/package.json
CHANGED
|
@@ -57,8 +57,8 @@ export function setWeChatAccount(weChatAccount) {
|
|
|
57
57
|
}
|
|
58
58
|
export function setChannelAccount(channel, account) {
|
|
59
59
|
const channelTypeMapping = {
|
|
60
|
-
LINE: types.SET_LINE_ACCOUNT,
|
|
61
|
-
WHATSAPP: types.SET_WHATSAPP_ACCOUNT,
|
|
60
|
+
[LINE]: types.SET_LINE_ACCOUNT,
|
|
61
|
+
[WHATSAPP]: types.SET_WHATSAPP_ACCOUNT,
|
|
62
62
|
};
|
|
63
63
|
if (channelTypeMapping[channel]) {
|
|
64
64
|
return {
|
|
@@ -35,9 +35,6 @@ import { getObjFromQueryParams } from '../../utils/v2common';
|
|
|
35
35
|
const {CapCustomCardList} = CapCustomCard;
|
|
36
36
|
|
|
37
37
|
const StyledCapTab = withStyles(CapTab, CapTabStyle);
|
|
38
|
-
|
|
39
|
-
const WHATSAPP_LOWERCASE = WHATSAPP.toLowerCase();
|
|
40
|
-
|
|
41
38
|
export class TemplatesV2 extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
42
39
|
constructor(props) {
|
|
43
40
|
super(props);
|
|
@@ -64,7 +61,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
64
61
|
line: {content: <></>, tab: intl.formatMessage(messages.line), key: 'line'},
|
|
65
62
|
viber: {content: <></>, tab: intl.formatMessage(messages.viber), key: 'viber'},
|
|
66
63
|
facebook: {content: <div></div>, tab: intl.formatMessage(messages.facebook), key: 'facebook'},
|
|
67
|
-
whatsapp: { content: <></>, tab: intl.formatMessage(messages.whatsapp), key:
|
|
64
|
+
whatsapp: { content: <></>, tab: intl.formatMessage(messages.whatsapp), key: WHATSAPP },
|
|
68
65
|
};
|
|
69
66
|
let filteredPanes = Object.keys(defaultPanes)
|
|
70
67
|
.filter((key) => !channelsToHide.includes(key)).reduce((obj = [], key) => {
|
|
@@ -82,7 +79,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
82
79
|
filteredPanes.push({content: <></>, tab: intl.formatMessage(messages.FTP), key: 'ftp'});
|
|
83
80
|
defaultChannel = 'FTP';
|
|
84
81
|
}
|
|
85
|
-
if (!enableNewChannels.includes(WHATSAPP)) {
|
|
82
|
+
if (!enableNewChannels.includes(WHATSAPP.toUpperCase())) {
|
|
86
83
|
filteredPanes.splice(7, 1);
|
|
87
84
|
}
|
|
88
85
|
}
|
|
@@ -130,8 +127,8 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
130
127
|
componentDidMount() {
|
|
131
128
|
const queryItems = getObjFromQueryParams(location.search);
|
|
132
129
|
|
|
133
|
-
if (queryItems.channel ===
|
|
134
|
-
this.channelChange(
|
|
130
|
+
if (queryItems.channel === WHATSAPP) {
|
|
131
|
+
this.channelChange(WHATSAPP);
|
|
135
132
|
}
|
|
136
133
|
}
|
|
137
134
|
|