To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Verified Commit 65c9f34d authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Fix rendering issue with some event signup notifications

parent b6f679dc
Pipeline #59089 failed with stages
in 15 minutes and 17 seconds
......@@ -151,6 +151,7 @@ const EventDetails = ({ eventId, ...props }) => {
const { data } = event
const htmlToReactParser = new HtmlToReactParser()
const now = new Date()
const hasOpenRegistration =
data.time_register_start &&
......@@ -169,7 +170,10 @@ const EventDetails = ({ eventId, ...props }) => {
// --------------------
// Prepare notification
if (storedNotification && storedNotification.label) {
notification = storedNotification
notification = {
...storedNotification,
label: htmlToReactParser.parse(storedNotification.label),
}
} else if (
data.time_register_start &&
now < new Date(data.time_register_start)
......@@ -423,8 +427,6 @@ const EventDetails = ({ eventId, ...props }) => {
)
}
const htmlToReactParser = new HtmlToReactParser()
return (
<div className={[classes.root].join(' ')} {...props}>
{notification && (
......@@ -432,7 +434,7 @@ const EventDetails = ({ eventId, ...props }) => {
className={classes.notification}
severity={notification.severity}
>
{htmlToReactParser.parse(notification.label)}
{notification.label}
</Alert>
)}
<div
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment