chore: Replace routeMixin with useRouteHelper composable
This commit is contained in:
@@ -5,7 +5,7 @@ import ArticleCardSkeletonLoader from 'widget/components/ArticleCardSkeletonLoad
|
||||
|
||||
import { mapGetters } from 'vuex';
|
||||
import darkModeMixin from 'widget/mixins/darkModeMixin';
|
||||
import routerMixin from 'widget/mixins/routerMixin';
|
||||
import { useRouterHelper } from 'widget/composables/useRouterHelper';
|
||||
import configMixin from 'widget/mixins/configMixin';
|
||||
|
||||
export default {
|
||||
@@ -15,7 +15,11 @@ export default {
|
||||
TeamAvailability,
|
||||
ArticleCardSkeletonLoader,
|
||||
},
|
||||
mixins: [configMixin, routerMixin, darkModeMixin],
|
||||
mixins: [configMixin, darkModeMixin],
|
||||
setup() {
|
||||
const { replaceRoute } = useRouterHelper();
|
||||
return { replaceRoute };
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
availableAgents: 'agent/availableAgents',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import PreChatForm from '../components/PreChat/Form.vue';
|
||||
import configMixin from '../mixins/configMixin';
|
||||
import routerMixin from '../mixins/routerMixin';
|
||||
import { useRouterHelper } from 'widget/composables/useRouterHelper';
|
||||
import { isEmptyObject } from 'widget/helpers/utils';
|
||||
import { ON_CONVERSATION_CREATED } from '../constants/widgetBusEvents';
|
||||
|
||||
@@ -9,7 +9,11 @@ export default {
|
||||
components: {
|
||||
PreChatForm,
|
||||
},
|
||||
mixins: [configMixin, routerMixin],
|
||||
mixins: [configMixin],
|
||||
setup() {
|
||||
const { replaceRoute } = useRouterHelper();
|
||||
return { replaceRoute };
|
||||
},
|
||||
mounted() {
|
||||
this.$emitter.on(ON_CONVERSATION_CREATED, () => {
|
||||
// Redirect to messages page after conversation is created
|
||||
|
||||
Reference in New Issue
Block a user