Show chat on help/welcome/updates/features groups

This commit is contained in:
Ian Philips 2022-08-03 15:00:14 -06:00
parent eb32bc15c4
commit d2ed985f2a
2 changed files with 16 additions and 5 deletions

View File

@ -189,13 +189,24 @@ export function GroupChatInBubble(props: {
const router = useRouter()
useEffect(() => {
if (router.asPath.includes('/chat')) {
const groupsWithChatEmphasis = [
'welcome',
'bugs',
'manifold-features-25bad7c7792e',
'updates',
]
if (
router.asPath.includes('/chat') ||
groupsWithChatEmphasis.includes(
router.asPath.split('/group/')[1].split('/')[0]
)
) {
setShouldShowChat(true)
}
// Leave chat open between groups if user is using chat?
// else {
// setShouldShowChat(false)
// }
else {
setShouldShowChat(false)
}
}, [router.asPath])
return (

View File

@ -30,7 +30,7 @@ import { fromPropz, usePropz } from 'web/hooks/use-propz'
import { Tabs } from 'web/components/layout/tabs'
import { CreateQuestionButton } from 'web/components/create-question-button'
import React, { useState } from 'react'
import { GroupChat, GroupChatInBubble } from 'web/components/groups/group-chat'
import { GroupChatInBubble } from 'web/components/groups/group-chat'
import { LoadingIndicator } from 'web/components/loading-indicator'
import { Modal } from 'web/components/layout/modal'
import { getSavedSort } from 'web/hooks/use-sort-and-query-params'