Skip to content

Commit 33399c2

Browse files
Allow HTML tag in notification msg
topcoder-platform/community-app#4122
1 parent ab74a3c commit 33399c2

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

dist/dev/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/prod/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/NotificationsPopup/NotificationList.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ const Item = ({ item, auth, onDismiss, markNotificationAsRead, isLink }) =>
5353
>
5454
<Fragment>
5555
<div className={styles.left}>
56-
<p className={styles['txt']}>{item.contents}</p>
56+
<p
57+
className={styles['txt']}
58+
dangerouslySetInnerHTML={{ // eslint-disable-line react/no-danger
59+
__html: item.contents || ''
60+
}}
61+
/>
5762
<span className={styles['time-txt']}>{moment(item.date).fromNow()}</span>
5863
</div>
5964
<div className={styles.right}>

src/components/NotificationsPopup/styles.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@
149149
text-align: center;
150150
margin: 15px auto 25px auto;
151151
}
152+
a {
153+
color: #0D61BF;
154+
text-decoration: underline;
155+
cursor: pointer;
156+
}
152157
}
153158
.light-bar {
154159
background-color: $green-light;

0 commit comments

Comments
 (0)