link to following page for daily watch reward notification

This commit is contained in:
Sean Yesmunt 2020-09-15 10:00:35 -04:00
parent ac770518bf
commit 93c2e753b2
2 changed files with 12 additions and 2 deletions

View file

@ -1,6 +1,12 @@
// @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 React from 'react';
import classnames from 'classnames';
@ -25,7 +31,10 @@ export default function Notification(props: Props) {
const { notification, menuButton = false, doSeeNotifications } = props;
const { push } = useHistory();
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 commentText = isCommentNotification && notification_parameters.dynamic.comment;
let notificationLink = formatLbryUrlForWeb(notificationTarget);

View file

@ -1,3 +1,4 @@
export const NOTIFICATION_CREATOR_SUBSCRIBER = 'creator_subscriber';
export const NOTIFICATION_COMMENT = 'comment';
export const NOTIFICATION_REPLY = 'comment-reply';
export const DAILY_WATCH_AVAILABLE = 'daily_watch_available';