Notification: further handle "missed_out" + other tweaks #6052

Merged
infinite-persistence merged 2 commits from ip/missed-out into master 2021-05-12 19:51:55 +02:00
2 changed files with 12 additions and 2 deletions

View file

@ -42,6 +42,9 @@ export default function Notification(props: Props) {
case NOTIFICATIONS.DAILY_WATCH_REMIND: case NOTIFICATIONS.DAILY_WATCH_REMIND:
notificationTarget = `/$/${PAGES.CHANNELS_FOLLOWING}`; notificationTarget = `/$/${PAGES.CHANNELS_FOLLOWING}`;
break; break;
case NOTIFICATIONS.MISSED_OUT:
notificationTarget = `/$/${PAGES.REWARDS_VERIFY}?redirect=/$/${PAGES.REWARDS}`;
break;
default: default:
notificationTarget = notification_parameters.device.target; notificationTarget = notification_parameters.device.target;
} }
@ -80,6 +83,7 @@ export default function Notification(props: Props) {
break; break;
case NOTIFICATIONS.DAILY_WATCH_AVAILABLE: case NOTIFICATIONS.DAILY_WATCH_AVAILABLE:
case NOTIFICATIONS.DAILY_WATCH_REMIND: case NOTIFICATIONS.DAILY_WATCH_REMIND:
case NOTIFICATIONS.MISSED_OUT:
icon = <Icon icon={ICONS.LBC} sectionIcon />; icon = <Icon icon={ICONS.LBC} sectionIcon />;
break; break;
default: default:
@ -145,11 +149,16 @@ export default function Notification(props: Props) {
<div className="notification__title"> <div className="notification__title">
<LbcMessage>{notification_parameters.device.title}</LbcMessage> <LbcMessage>{notification_parameters.device.title}</LbcMessage>
</div> </div>
<div className="notification__text mobile-hidden">{commentText}</div> <div title={commentText} className="notification__text mobile-hidden">
{commentText}
</div>
</> </>
) : ( ) : (
<> <>
<div className="notification__text"> <div
title={notification_parameters.device.text.replace(/\sLBC/g, ' Credits')}
className="notification__text"
>
<LbcMessage>{notification_parameters.device.text}</LbcMessage> <LbcMessage>{notification_parameters.device.text}</LbcMessage>
</div> </div>
</> </>

View file

@ -1,6 +1,7 @@
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 MISSED_OUT = 'missed_out';
export const DAILY_WATCH_AVAILABLE = 'daily_watch_available'; export const DAILY_WATCH_AVAILABLE = 'daily_watch_available';
export const DAILY_WATCH_REMIND = 'daily_watch_remind'; export const DAILY_WATCH_REMIND = 'daily_watch_remind';
export const NEW_CONTENT = 'new_content'; export const NEW_CONTENT = 'new_content';