recon notify components
This commit is contained in:
parent
3dc7c35cd7
commit
765cef7564
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue