diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index e20b6028..185225e9 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -275,7 +275,9 @@ function IncomeNotificationGroupItem(props: { > {'Daily Income Summary: '} - {formatMoney(totalIncome)} + + {'+' + formatMoney(totalIncome)} + @@ -291,11 +293,44 @@ function IncomeNotificationGroupItem(props: { .slice(0, numSummaryLines) .map((notification) => { return ( - + > +
+
+
+
+ +
+ + {getReasonForShowingNotification( + notification, + true + )} + {` on`} + + +
+
+
+ ) })}
@@ -640,6 +675,34 @@ function NotificationSettings() { ) } +function NotificationLink(props: { notification: Notification }) { + const { notification } = props + const { + sourceType, + sourceContractTitle, + sourceContractCreatorUsername, + sourceContractSlug, + sourceSlug, + sourceTitle, + } = notification + return ( + + {sourceContractTitle || sourceTitle} + + ) +} + function NotificationItem(props: { notification: Notification justSummary?: boolean @@ -656,11 +719,9 @@ function NotificationItem(props: { sourceUserUsername, createdTime, sourceText, - sourceContractTitle, sourceContractCreatorUsername, sourceContractSlug, sourceSlug, - sourceTitle, } = notification const [defaultNotificationText, setDefaultNotificationText] = @@ -790,20 +851,7 @@ function NotificationItem(props: { {sourceType && reason && (
{getReasonForShowingNotification(notification, false)} - - {sourceContractTitle || sourceTitle} - +
)}
@@ -892,9 +940,7 @@ function NotificationTextLabel(props: { ) } else if (sourceType === 'bonus' && sourceText) { return ( - - {'+' + formatMoney(parseInt(sourceText))} - + {formatMoney(parseInt(sourceText))} ) } // return default text @@ -931,7 +977,7 @@ function getReasonForShowingNotification( else reasonText = `commented on` break case 'contract': - if (reason === 'you_follow_user') reasonText = 'created a new question' + if (reason === 'you_follow_user') reasonText = 'asked' else if (sourceUpdateType === 'resolved') reasonText = `resolved` else if (sourceUpdateType === 'closed') reasonText = `Please resolve your question` @@ -968,7 +1014,7 @@ function getReasonForShowingNotification( ? `You had ${ parseInt(sourceText) / UNIQUE_BETTOR_BONUS_AMOUNT } unique bettors on` - : 'You earned Mana for unique bettors:' + : ' for unique bettors' else reasonText = 'You earned your daily manna' break default: