Show chat on help/welcome/updates/features groups
This commit is contained in:
parent
eb32bc15c4
commit
d2ed985f2a
|
@ -189,13 +189,24 @@ export function GroupChatInBubble(props: {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
useEffect(() => {
|
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)
|
setShouldShowChat(true)
|
||||||
}
|
}
|
||||||
// Leave chat open between groups if user is using chat?
|
// Leave chat open between groups if user is using chat?
|
||||||
// else {
|
else {
|
||||||
// setShouldShowChat(false)
|
setShouldShowChat(false)
|
||||||
// }
|
}
|
||||||
}, [router.asPath])
|
}, [router.asPath])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -30,7 +30,7 @@ import { fromPropz, usePropz } from 'web/hooks/use-propz'
|
||||||
import { Tabs } from 'web/components/layout/tabs'
|
import { Tabs } from 'web/components/layout/tabs'
|
||||||
import { CreateQuestionButton } from 'web/components/create-question-button'
|
import { CreateQuestionButton } from 'web/components/create-question-button'
|
||||||
import React, { useState } from 'react'
|
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 { LoadingIndicator } from 'web/components/loading-indicator'
|
||||||
import { Modal } from 'web/components/layout/modal'
|
import { Modal } from 'web/components/layout/modal'
|
||||||
import { getSavedSort } from 'web/hooks/use-sort-and-query-params'
|
import { getSavedSort } from 'web/hooks/use-sort-and-query-params'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user