recon notify components

This commit is contained in:
zeppi 2021-07-19 22:02:59 -04:00 committed by jessopb
parent 3dc7c35cd7
commit 765cef7564
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,7 @@
// @flow // @flow
import React from 'react'; import React from 'react';
import classnames from 'classnames'; import classnames from 'classnames';
import { ENABLE_UI_NOTIFICATIONS } from 'config';
type Props = { type Props = {
unseenCount: number, unseenCount: number,
@ -10,7 +11,7 @@ type Props = {
export default function NotificationHeaderButton(props: Props) { export default function NotificationHeaderButton(props: Props) {
const { unseenCount, inline = false, user } = props; const { unseenCount, inline = false, user } = props;
const notificationsEnabled = user && user.experimental_ui; const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui);
if (unseenCount === 0 || !notificationsEnabled) { if (unseenCount === 0 || !notificationsEnabled) {
return null; return null;

View file

@ -6,6 +6,7 @@ import Icon from 'component/common/icon';
import NotificationBubble from 'component/notificationBubble'; import NotificationBubble from 'component/notificationBubble';
import Button from 'component/button'; import Button from 'component/button';
import { useHistory } from 'react-router'; import { useHistory } from 'react-router';
import { ENABLE_UI_NOTIFICATIONS } from 'config';
type Props = { type Props = {
unseenCount: number, unseenCount: number,
@ -21,7 +22,7 @@ export default function NotificationHeaderButton(props: Props) {
doSeeAllNotifications, doSeeAllNotifications,
user, user,
} = props; } = props;
const notificationsEnabled = user && user.experimental_ui; const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui);
const { push } = useHistory(); const { push } = useHistory();
function handleMenuClick() { function handleMenuClick() {