@@ -6,7 +6,6 @@ import get from 'lodash/get'
6
6
import { useRouter } from 'next/router'
7
7
import React , { useCallback } from 'react'
8
8
9
- import { useFeatureFlags } from '@open-condo/featureflags/FeatureFlagsContext'
10
9
import { Menu } from '@open-condo/icons'
11
10
import { useMutation } from '@open-condo/next/apollo'
12
11
import { useAuth } from '@open-condo/next/auth'
@@ -16,7 +15,6 @@ import { Space } from '@open-condo/ui'
16
15
import { useLayoutContext } from '@condo/domains/common/components/LayoutContext'
17
16
import { Logo } from '@condo/domains/common/components/Logo'
18
17
import { ResidentActions } from '@condo/domains/common/components/ResidentActions/ResidentActions'
19
- import { PLATFORM_NOTIFICATIONS } from '@condo/domains/common/constants/featureflags'
20
18
import { UserMessagesList } from '@condo/domains/notification/components/UserMessagesList'
21
19
import { UserMessagesListContextProvider } from '@condo/domains/notification/contexts/UserMessagesListContext'
22
20
import { InlineOrganizationSelect } from '@condo/domains/organization/components/OrganizationSelect'
@@ -39,7 +37,6 @@ interface IHeaderProps {
39
37
export const Header : React . FC < IHeaderProps > = ( props ) => {
40
38
const client = useApolloClient ( )
41
39
const { breakpoints, toggleCollapsed } = useLayoutContext ( )
42
- const { useFlag } = useFeatureFlags ( )
43
40
const router = useRouter ( )
44
41
45
42
const { isAuthenticated } = useAuth ( )
@@ -73,78 +70,42 @@ export const Header: React.FC<IHeaderProps> = (props) => {
73
70
}
74
71
} , [ isAuthenticated , router ] )
75
72
76
- const isPlatformNotificationsFeatureEnabled = useFlag ( PLATFORM_NOTIFICATIONS )
77
-
78
- if ( isPlatformNotificationsFeatureEnabled ) {
79
- return (
80
- < UserMessagesListContextProvider >
81
- {
82
- ! breakpoints . TABLET_LARGE
83
- ? (
84
- < >
85
- < div id = 'tasks-container' className = 'tasks-container' />
86
- < Layout . Header className = 'header mobile-header' >
87
- < div className = 'context-bar' >
88
- < UserMessagesList />
89
- < div className = 'organization-user-block' >
90
- < Space direction = 'horizontal' size = { 4 } >
91
- < SBBOLIndicator organization = { organization } />
92
- < InlineOrganizationSelect />
93
- </ Space >
94
- < UserMenu />
95
- </ div >
73
+ return (
74
+ < UserMessagesListContextProvider >
75
+ {
76
+ ! breakpoints . TABLET_LARGE
77
+ ? (
78
+ < >
79
+ < div id = 'tasks-container' className = 'tasks-container' />
80
+ < Layout . Header className = 'header mobile-header' >
81
+ < div className = 'context-bar' >
82
+ < UserMessagesList />
83
+ < div className = 'organization-user-block' >
84
+ < Space direction = 'horizontal' size = { 4 } >
85
+ < SBBOLIndicator organization = { organization } />
86
+ < InlineOrganizationSelect />
87
+ </ Space >
88
+ < UserMenu />
96
89
</ div >
97
- < div className = 'appeals-bar' >
98
- < Menu size = 'large' onClick = { toggleCollapsed } / >
99
- < Logo onClick = { handleLogoClick } minified />
100
- < div >
101
- { hasAccessToAppeals && (
102
- < ResidentActions minified />
103
- ) }
104
- </ div >
90
+ </ div >
91
+ < div className = 'appeals-bar' >
92
+ < Menu size = 'large' onClick = { toggleCollapsed } />
93
+ < Logo onClick = { handleLogoClick } minified / >
94
+ < div >
95
+ { hasAccessToAppeals && (
96
+ < ResidentActions minified />
97
+ ) }
105
98
</ div >
106
- </ Layout . Header >
107
- </ >
108
- )
109
- : (
110
- < Layout . Header className = 'header desktop-header' >
111
- < TopMenuItems headerAction = { props . headerAction } />
99
+ </ div >
112
100
</ Layout . Header >
113
- )
114
- }
115
- </ UserMessagesListContextProvider >
116
- )
117
- }
118
-
119
- return (
120
- ! breakpoints . TABLET_LARGE
121
- ? (
122
- < >
123
- < div id = 'tasks-container' className = 'tasks-container' />
124
- < Layout . Header className = 'header mobile-header' >
125
- < div className = 'context-bar' >
126
- < Space direction = 'horizontal' size = { 4 } >
127
- < SBBOLIndicator organization = { organization } />
128
- < InlineOrganizationSelect />
129
- </ Space >
130
- < UserMenu />
131
- </ div >
132
- < div className = 'appeals-bar' >
133
- < Menu size = 'large' onClick = { toggleCollapsed } />
134
- < Logo onClick = { handleLogoClick } minified />
135
- < div >
136
- { hasAccessToAppeals && (
137
- < ResidentActions minified />
138
- ) }
139
- </ div >
140
- </ div >
141
- </ Layout . Header >
142
- </ >
143
- )
144
- : (
145
- < Layout . Header className = 'header desktop-header' >
146
- < TopMenuItems headerAction = { props . headerAction } />
147
- </ Layout . Header >
148
- )
101
+ </ >
102
+ )
103
+ : (
104
+ < Layout . Header className = 'header desktop-header' >
105
+ < TopMenuItems headerAction = { props . headerAction } />
106
+ </ Layout . Header >
107
+ )
108
+ }
109
+ </ UserMessagesListContextProvider >
149
110
)
150
111
}
0 commit comments