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