7
7
*/
8
8
9
9
import React from 'react'
10
- import { useRouteMatch } from 'react-router-dom'
10
+ import { useLocation , useRouteMatch } from 'react-router-dom'
11
11
import clsx from 'clsx'
12
12
import { observer } from 'mobx-react-lite'
13
13
@@ -20,6 +20,7 @@ import { DeprecatedApiBanner } from './DeprecatedApiBanner'
20
20
import { Footer } from './Footer'
21
21
22
22
import styles from './styles.module.scss'
23
+ import cn from "classnames" ;
23
24
24
25
type Props = {
25
26
children : React . ReactNode
@@ -28,6 +29,8 @@ type Props = {
28
29
export const ContentLayout = React . memo ( observer ( ( props : Props ) => {
29
30
const { children } = props
30
31
32
+ const location = useLocation ( ) ;
33
+
31
34
const isOrgJoeInstance = Boolean (
32
35
useRouteMatch ( ROUTES . ORG . JOE_INSTANCES . JOE_INSTANCE . createPath ( ) ) ,
33
36
)
@@ -36,12 +39,16 @@ export const ContentLayout = React.memo(observer((props: Props) => {
36
39
useRouteMatch ( ROUTES . ORG . PROJECT . JOE_INSTANCES . JOE_INSTANCE . createPath ( ) ) ,
37
40
)
38
41
42
+ const isAssistantPage = Boolean (
43
+ useRouteMatch ( ROUTES . ORG . PROJECT . ASSISTANT . createPath ( ) )
44
+ )
45
+
39
46
const isDemoOrg = Boolean ( useRouteMatch ( `/${ settings . demoOrgAlias } ` ) )
40
47
41
48
const isHiddenFooter = isOrgJoeInstance || isProjectJoeInstance
42
49
43
50
return (
44
- < div className = { styles . root } >
51
+ < div className = { cn ( styles . root , { [ styles . rootAssistant ] : isAssistantPage } ) } >
45
52
{ isDemoOrg && < DemoOrgNotice /> }
46
53
{ bannersStore . isOpenDeprecatedApi && < DeprecatedApiBanner /> }
47
54
0 commit comments