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 }) => { ...@@ -151,6 +151,7 @@ const EventDetails = ({ eventId, ...props }) => {
const { data } = event const { data } = event
const htmlToReactParser = new HtmlToReactParser()
const now = new Date() const now = new Date()
const hasOpenRegistration = const hasOpenRegistration =
data.time_register_start && data.time_register_start &&
...@@ -169,7 +170,10 @@ const EventDetails = ({ eventId, ...props }) => { ...@@ -169,7 +170,10 @@ const EventDetails = ({ eventId, ...props }) => {
// -------------------- // --------------------
// Prepare notification // Prepare notification
if (storedNotification && storedNotification.label) { if (storedNotification && storedNotification.label) {
notification = storedNotification notification = {
...storedNotification,
label: htmlToReactParser.parse(storedNotification.label),
}
} else if ( } else if (
data.time_register_start && data.time_register_start &&
now < new Date(data.time_register_start) now < new Date(data.time_register_start)
...@@ -423,8 +427,6 @@ const EventDetails = ({ eventId, ...props }) => { ...@@ -423,8 +427,6 @@ const EventDetails = ({ eventId, ...props }) => {
) )
} }
const htmlToReactParser = new HtmlToReactParser()
return ( return (
<div className={[classes.root].join(' ')} {...props}> <div className={[classes.root].join(' ')} {...props}>
{notification && ( {notification && (
...@@ -432,7 +434,7 @@ const EventDetails = ({ eventId, ...props }) => { ...@@ -432,7 +434,7 @@ const EventDetails = ({ eventId, ...props }) => {
className={classes.notification} className={classes.notification}
severity={notification.severity} severity={notification.severity}
> >
{htmlToReactParser.parse(notification.label)} {notification.label}
</Alert> </Alert>
)} )}
<div <div
......
Supports Markdown
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