chore: Move referrerHost to appConfig store (#3433)

This commit is contained in:
Pranav Raj S
2021-11-22 15:05:29 +05:30
committed by GitHub
parent 1be7c2d72c
commit 1a8b8f0900
11 changed files with 138 additions and 81 deletions

View File

@@ -1,23 +1,31 @@
import { SET_WIDGET_COLOR } from '../types';
import { SET_REFERRER_HOST, SET_WIDGET_COLOR } from '../types';
const state = {
widgetColor: '',
referrerHost: '',
};
const getters = {
export const getters = {
getWidgetColor: $state => $state.widgetColor,
getReferrerHost: $state => $state.referrerHost,
};
const actions = {
export const actions = {
setWidgetColor({ commit }, data) {
commit(SET_WIDGET_COLOR, data);
},
setReferrerHost({ commit }, referrerHost) {
commit(SET_REFERRER_HOST, referrerHost);
},
};
const mutations = {
export const mutations = {
[SET_WIDGET_COLOR]($state, data) {
$state.widgetColor = data.widgetColor;
},
[SET_REFERRER_HOST]($state, referrerHost) {
$state.referrerHost = referrerHost;
},
};
export default {