link to following page for daily watch reward notification
This commit is contained in:
parent
ac770518bf
commit
93c2e753b2
2 changed files with 12 additions and 2 deletions
|
@ -1,6 +1,12 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import { NOTIFICATION_CREATOR_SUBSCRIBER, NOTIFICATION_COMMENT, NOTIFICATION_REPLY } from 'constants/notifications';
|
import {
|
||||||
|
NOTIFICATION_CREATOR_SUBSCRIBER,
|
||||||
|
NOTIFICATION_COMMENT,
|
||||||
|
NOTIFICATION_REPLY,
|
||||||
|
DAILY_WATCH_AVAILABLE,
|
||||||
|
} from 'constants/notifications';
|
||||||
|
import * as PAGES from 'constants/pages';
|
||||||
import * as ICONS from 'constants/icons';
|
import * as ICONS from 'constants/icons';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
@ -25,7 +31,10 @@ export default function Notification(props: Props) {
|
||||||
const { notification, menuButton = false, doSeeNotifications } = props;
|
const { notification, menuButton = false, doSeeNotifications } = props;
|
||||||
const { push } = useHistory();
|
const { push } = useHistory();
|
||||||
const { notification_rule, notification_parameters, is_seen, id } = notification;
|
const { notification_rule, notification_parameters, is_seen, id } = notification;
|
||||||
const notificationTarget = notification && notification_parameters.device.target;
|
const notificationTarget =
|
||||||
|
notification && notification_rule === DAILY_WATCH_AVAILABLE
|
||||||
|
? `/$/${PAGES.CHANNELS_FOLLOWING}`
|
||||||
|
: notification_parameters.device.target;
|
||||||
const isCommentNotification = notification_rule === NOTIFICATION_COMMENT || notification_rule === NOTIFICATION_REPLY;
|
const isCommentNotification = notification_rule === NOTIFICATION_COMMENT || notification_rule === NOTIFICATION_REPLY;
|
||||||
const commentText = isCommentNotification && notification_parameters.dynamic.comment;
|
const commentText = isCommentNotification && notification_parameters.dynamic.comment;
|
||||||
let notificationLink = formatLbryUrlForWeb(notificationTarget);
|
let notificationLink = formatLbryUrlForWeb(notificationTarget);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
export const NOTIFICATION_CREATOR_SUBSCRIBER = 'creator_subscriber';
|
export const NOTIFICATION_CREATOR_SUBSCRIBER = 'creator_subscriber';
|
||||||
export const NOTIFICATION_COMMENT = 'comment';
|
export const NOTIFICATION_COMMENT = 'comment';
|
||||||
export const NOTIFICATION_REPLY = 'comment-reply';
|
export const NOTIFICATION_REPLY = 'comment-reply';
|
||||||
|
export const DAILY_WATCH_AVAILABLE = 'daily_watch_available';
|
||||||
|
|
Loading…
Add table
Reference in a new issue