chore: Replace widget config mixin with useConfig composable

This commit is contained in:
Fayaz Ahmed
2024-08-13 19:04:55 +05:30
parent 7ff939efd5
commit 7db7ae0ed8
15 changed files with 302 additions and 145 deletions
@@ -1,7 +1,7 @@
<script>
import messageFormatterMixin from 'shared/mixins/messageFormatterMixin';
import Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';
import configMixin from '../mixins/configMixin';
import { useConfig } from 'widget/composables/useConfig';
import { isEmptyObject } from 'widget/helpers/utils';
import {
ON_CAMPAIGN_MESSAGE_CLICK,
@@ -11,7 +11,7 @@ import darkModeMixin from 'widget/mixins/darkModeMixin';
export default {
name: 'UnreadMessage',
components: { Thumbnail },
mixins: [messageFormatterMixin, configMixin, darkModeMixin],
mixins: [messageFormatterMixin, darkModeMixin],
props: {
message: {
type: String,
@@ -30,6 +30,14 @@ export default {
default: null,
},
},
setup() {
const { useInboxAvatarForBot, inboxAvatarUrl, channelConfig } = useConfig();
return {
useInboxAvatarForBot,
inboxAvatarUrl,
channelConfig,
};
},
computed: {
companyName() {
return `${this.$t('UNREAD_VIEW.COMPANY_FROM')} ${