2021-07-15 08:01:43 +00:00
|
|
|
import { CAMPAIGN_TYPES } from '../constants/campaign';
|
|
|
|
export default {
|
|
|
|
computed: {
|
|
|
|
campaignType() {
|
2021-08-11 14:59:33 +00:00
|
|
|
const pageURL = window.location.href;
|
|
|
|
const type = pageURL.substr(pageURL.lastIndexOf('/') + 1);
|
|
|
|
return type;
|
2021-07-15 08:01:43 +00:00
|
|
|
},
|
|
|
|
isOngoingType() {
|
|
|
|
return this.campaignType === CAMPAIGN_TYPES.ONGOING;
|
|
|
|
},
|
|
|
|
isOnOffType() {
|
|
|
|
return this.campaignType === CAMPAIGN_TYPES.ONE_OFF;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|