Skip to content

Commit

Permalink
Hide Notification icon in Matrix mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale Fukami committed Oct 19, 2023
1 parent 958eccb commit b7ceacc
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/components/user-actions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import './styles.scss';
import { IconBell1, IconMessageSquare2 } from '@zero-tech/zui/icons';
import { NotificationPopup } from '../notification/popup';
import { UserMenuPopup } from './user-menu-popup';
import { featureFlags } from '../../lib/feature-flags';

export interface Properties {
userAddress: string;
Expand Down Expand Up @@ -71,16 +72,18 @@ export class UserActions extends React.Component<Properties, State> {
<div className='user-actions__badge'>{this.unreadConversationCount}</div>
)}
</button>
<button
className='user-actions__icon-button'
ref={this.notificationIconRef}
onClick={this.toggleNotificationState}
>
<IconBell1 isFilled={this.state.isNotificationPopupOpen} />
{this.props.unreadNotificationCount > 0 && (
<div className='user-actions__badge'>{this.unreadNotificationCount}</div>
)}
</button>
{!featureFlags.enableMatrix && (
<button
className='user-actions__icon-button'
ref={this.notificationIconRef}
onClick={this.toggleNotificationState}
>
<IconBell1 isFilled={this.state.isNotificationPopupOpen} />
{this.props.unreadNotificationCount > 0 && (
<div className='user-actions__badge'>{this.unreadNotificationCount}</div>
)}
</button>
)}
<button onClick={this.toggleUserPopupState}>
<Avatar type='circle' size='regular' imageURL={this.props.userImageUrl} statusType={this.userStatus} />
</button>
Expand Down

0 comments on commit b7ceacc

Please sign in to comment.