diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx
index 7a8f6d2f..362ed433 100644
--- a/web/pages/notifications.tsx
+++ b/web/pages/notifications.tsx
@@ -342,8 +342,6 @@ function IncomeNotificationItem(props: {
-
+
@@ -532,18 +526,6 @@ function NotificationItem(props: {
sourceText,
} = notification
- const [defaultNotificationText, setDefaultNotificationText] =
- useState('')
-
- useEffect(() => {
- if (sourceText) {
- setDefaultNotificationText(sourceText)
- } else if (reasonText) {
- // Handle arbitrary notifications with reason text here.
- setDefaultNotificationText(reasonText)
- }
- }, [reasonText, sourceText])
-
const [highlighted] = useState(!notification.isSeen)
useEffect(() => {
@@ -569,8 +551,6 @@ function NotificationItem(props: {
-
+
@@ -770,18 +746,21 @@ function getSourceIdForLinkComponent(
}
function NotificationTextLabel(props: {
- defaultText: string
- contract?: Contract | null
notification: Notification
className?: string
justSummary?: boolean
}) {
- const { contract, className, defaultText, notification, justSummary } = props
- const { sourceUpdateType, sourceType, sourceText, sourceContractTitle } =
- notification
+ const { className, notification, justSummary } = props
+ const {
+ sourceUpdateType,
+ sourceType,
+ sourceText,
+ sourceContractTitle,
+ reasonText,
+ } = notification
+ const defaultText = sourceText ?? reasonText ?? ''
if (sourceType === 'contract') {
- if (justSummary)
- return {contract?.question || sourceContractTitle}
+ if (justSummary) return {sourceContractTitle}
if (!sourceText) return
// Resolved contracts
if (sourceType === 'contract' && sourceUpdateType === 'resolved') {
@@ -795,9 +774,8 @@ function NotificationTextLabel(props: {
)
if (sourceText === 'CANCEL') return
if (sourceText === 'MKT' || sourceText === 'PROB') return
- if (contract?.outcomeType === 'PSEUDO_NUMERIC') {
- return
- }
+ // Numeric market
+ return
}
}
// Close date will be a number - it looks better without it