File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
apps/browser-extension-wallet/src
components/NotificationsCenter
providers/PostHogClientProvider/client Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
import React , { useState } from 'react' ;
2
2
import { NotificationsBell } from './NotificationsBell' ;
3
-
3
+ import { usePostHogClientContext } from '@providers/PostHogClientProvider' ;
4
+ import { ExperimentName } from '@lib/scripts/types/feature-flags' ;
4
5
export interface NotificationsCenterContainerProps {
5
6
popupView ?: boolean ;
6
7
}
7
8
8
9
// eslint-disable-next-line @typescript-eslint/no-unused-vars
9
10
export const NotificationsBellContainer = ( { popupView } : NotificationsCenterContainerProps ) : React . ReactElement => {
11
+ const posthog = usePostHogClientContext ( ) ;
12
+
10
13
// TODO Connect with notifications center
11
14
const [ notificationsCount , setNotificationsCount ] = useState ( 0 ) ;
12
15
@@ -16,5 +19,9 @@ export const NotificationsBellContainer = ({ popupView }: NotificationsCenterCon
16
19
setNotificationsCount ( notificationsCount === 11 ? 0 : notificationsCount + 1 ) ;
17
20
} ;
18
21
19
- return < NotificationsBell notificationsCount = { notificationsCount } onClick = { handleClick } popupView = { popupView } /> ;
22
+ return (
23
+ posthog ?. isFeatureFlagEnabled ( ExperimentName . NOTIFICATIONS_CENTER ) && (
24
+ < NotificationsBell notificationsCount = { notificationsCount } onClick = { handleClick } popupView = { popupView } />
25
+ )
26
+ ) ;
20
27
} ;
Original file line number Diff line number Diff line change 5
5
position : absolute ;
6
6
top : size_unit (-2 );
7
7
right : size_unit (-2 );
8
- background : purple ;
8
+ background : #7f5af0 ;
9
9
color : white ;
10
10
border-radius : 50% ;
11
11
padding : 2px 2px ;
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ export enum ExperimentName {
15
15
BITCOIN_WALLETS = 'bitcoin-wallets' ,
16
16
NFTPRINTLAB = 'nftprintlab' ,
17
17
GLACIER_DROP = 'glacier-drop' ,
18
- MEMPOOLSPACE_FEE_MARKET = 'bitcoin-mempool-space-fee-market'
18
+ MEMPOOLSPACE_FEE_MARKET = 'bitcoin-mempool-space-fee-market' ,
19
+ NOTIFICATIONS_CENTER = 'notifications-center'
19
20
}
20
21
21
22
export type FeatureFlag = `${ExperimentName } `;
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ const defaultFeatureFlags: FeatureFlags = {
39
39
[ ExperimentName . BITCOIN_WALLETS ] : false ,
40
40
[ ExperimentName . NFTPRINTLAB ] : false ,
41
41
[ ExperimentName . GLACIER_DROP ] : false ,
42
- [ ExperimentName . MEMPOOLSPACE_FEE_MARKET ] : false
42
+ [ ExperimentName . MEMPOOLSPACE_FEE_MARKET ] : false ,
43
+ [ ExperimentName . NOTIFICATIONS_CENTER ] : false
43
44
} ;
44
45
45
46
export const featureFlagsByNetworkInitialValue : FeatureFlagsByNetwork = {
You can’t perform that action at this time.
0 commit comments