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
@@ -4,13 +4,13 @@ import { IFrameHelper, RNHelper } from 'widget/helpers/utils';
import { popoutChatWindow } from '../helpers/popoutHelper';
import FluentIcon from 'shared/components/FluentIcon/Index.vue';
import darkModeMixin from 'widget/mixins/darkModeMixin';
import configMixin from 'widget/mixins/configMixin';
import { useConfig } from 'widget/composables/useConfig';
import { CONVERSATION_STATUS } from 'shared/constants/messages';
export default {
name: 'HeaderActions',
components: { FluentIcon },
mixins: [configMixin, darkModeMixin],
mixins: [darkModeMixin],
props: {
showPopoutButton: {
type: Boolean,
@@ -21,6 +21,12 @@ export default {
default: true,
},
},
setup() {
const { hasEndConversationEnabled } = useConfig();
return {
hasEndConversationEnabled,
};
},
computed: {
...mapGetters({
conversationAttributes: 'conversationAttributes/getConversationParams',