feat: add channel icon component (#10471)

This pull request introduces a new `ChannelIcon` component and refactors the existing code to use this component, which simplifies the icon management for different channel types and providers.
This commit is contained in:
Shivam Mishra
2024-11-21 09:53:12 +05:30
committed by GitHub
parent 515778eabb
commit 3a334be582
4 changed files with 114 additions and 32 deletions

View File

@@ -0,0 +1,17 @@
<script setup>
import { useChannelIcon } from './provider';
import Icon from 'next/icon/Icon.vue';
const props = defineProps({
inbox: {
type: Object,
required: true,
},
});
const channelIcon = useChannelIcon(props.inbox);
</script>
<template>
<Icon :icon="channelIcon" />
</template>