fix(board): address review feedback on components
This commit is contained in:
parent
33d27c5d9e
commit
4d9eb3c198
3 changed files with 26 additions and 11 deletions
|
|
@ -61,8 +61,6 @@ const props = defineProps({
|
|||
|
||||
defineEmits(['edit', 'delete'])
|
||||
|
||||
const { resolveTagChannel, slackUrl } = useBoardChannels()
|
||||
|
||||
const hasSeeking = computed(() => !!(props.post.seeking && props.post.seeking.trim()))
|
||||
const hasOffering = computed(() => !!(props.post.offering && props.post.offering.trim()))
|
||||
|
||||
|
|
@ -81,9 +79,14 @@ const typeClass = computed(() => {
|
|||
})
|
||||
|
||||
const slackLink = computed(() => {
|
||||
const channel = resolveTagChannel(props.post.tags || [])
|
||||
if (!channel) return null
|
||||
return slackUrl(channel.slackChannelId)
|
||||
const postTags = props.post.tags || []
|
||||
if (!postTags.length) return null
|
||||
const channel = props.channels.find(c => {
|
||||
const slugs = c.tagSlugs || []
|
||||
return slugs.some(s => postTags.includes(s))
|
||||
})
|
||||
if (!channel || !channel.slackChannelId) return null
|
||||
return `https://gammaspace.slack.com/archives/${channel.slackChannelId}`
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue