From 021edda0dc3be45a24d86aec7e7089bddc06831a Mon Sep 17 00:00:00 2001 From: Ryderjj89 Date: Tue, 25 Nov 2025 08:35:48 -0500 Subject: [PATCH] Fixed description display again --- frontend/src/components/EventAdmin.tsx | 9 +++++---- frontend/src/components/EventDetails.tsx | 9 +++++---- frontend/src/components/EventList.tsx | 9 +++++---- frontend/src/components/EventView.tsx | 9 +++++---- frontend/src/components/RSVPForm.tsx | 9 +++++---- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/EventAdmin.tsx b/frontend/src/components/EventAdmin.tsx index 8bf1217..2b9a013 100644 --- a/frontend/src/components/EventAdmin.tsx +++ b/frontend/src/components/EventAdmin.tsx @@ -845,10 +845,11 @@ const EventAdmin: React.FC = () => { sx={{ mb: 2, pl: 2, - '& p': { marginBottom: 1 }, - '& ul, & ol': { marginLeft: 2, marginBottom: 1 }, - '& li': { marginBottom: 0.5 }, - '& h1, & h2, & h3': { marginTop: 2, marginBottom: 1 }, + '& p': { margin: 0 }, + '& p + p': { marginTop: '1em' }, + '& ul, & ol': { marginLeft: 2, marginTop: '1em', marginBottom: '1em' }, + '& li': { marginBottom: 0 }, + '& h1, & h2, & h3': { marginTop: '1em', marginBottom: '0.5em' }, '& a': { color: 'primary.main' }, }} dangerouslySetInnerHTML={{ __html: event.description || 'None' }} diff --git a/frontend/src/components/EventDetails.tsx b/frontend/src/components/EventDetails.tsx index 0244562..901c4d7 100644 --- a/frontend/src/components/EventDetails.tsx +++ b/frontend/src/components/EventDetails.tsx @@ -109,10 +109,11 @@ const EventDetails: React.FC = () => { { mb: 1, color: 'text.secondary', fontSize: '0.875rem', - '& p': { marginBottom: 0.5 }, - '& ul, & ol': { marginLeft: 2, marginBottom: 0.5 }, - '& li': { marginBottom: 0.25 }, - '& h1, & h2, & h3': { marginTop: 1, marginBottom: 0.5, fontSize: '1rem' }, + '& p': { margin: 0 }, + '& p + p': { marginTop: '0.75em' }, + '& ul, & ol': { marginLeft: 2, marginTop: '0.5em', marginBottom: '0.5em' }, + '& li': { marginBottom: 0 }, + '& h1, & h2, & h3': { marginTop: '0.75em', marginBottom: '0.25em', fontSize: '1rem' }, '& a': { color: 'primary.main' }, }} dangerouslySetInnerHTML={{ __html: event.description }} diff --git a/frontend/src/components/EventView.tsx b/frontend/src/components/EventView.tsx index 5259339..289aae3 100644 --- a/frontend/src/components/EventView.tsx +++ b/frontend/src/components/EventView.tsx @@ -193,10 +193,11 @@ const EventView: React.FC = () => { sx={{ mb: 2, pl: 2, - '& p': { marginBottom: 1 }, - '& ul, & ol': { marginLeft: 2, marginBottom: 1 }, - '& li': { marginBottom: 0.5 }, - '& h1, & h2, & h3': { marginTop: 2, marginBottom: 1 }, + '& p': { margin: 0 }, + '& p + p': { marginTop: '1em' }, + '& ul, & ol': { marginLeft: 2, marginTop: '1em', marginBottom: '1em' }, + '& li': { marginBottom: 0 }, + '& h1, & h2, & h3': { marginTop: '1em', marginBottom: '0.5em' }, '& a': { color: 'primary.main' }, }} dangerouslySetInnerHTML={{ __html: event.description || 'None' }} diff --git a/frontend/src/components/RSVPForm.tsx b/frontend/src/components/RSVPForm.tsx index dccc79a..d241981 100644 --- a/frontend/src/components/RSVPForm.tsx +++ b/frontend/src/components/RSVPForm.tsx @@ -462,10 +462,11 @@ const RSVPForm: React.FC = () => { pl: 2, color: 'text.secondary', fontSize: '0.875rem', - '& p': { marginBottom: 1 }, - '& ul, & ol': { marginLeft: 2, marginBottom: 1 }, - '& li': { marginBottom: 0.5 }, - '& h1, & h2, & h3': { marginTop: 2, marginBottom: 1 }, + '& p': { margin: 0 }, + '& p + p': { marginTop: '1em' }, + '& ul, & ol': { marginLeft: 2, marginTop: '1em', marginBottom: '1em' }, + '& li': { marginBottom: 0 }, + '& h1, & h2, & h3': { marginTop: '1em', marginBottom: '0.5em' }, '& a': { color: 'primary.main' }, }} dangerouslySetInnerHTML={{ __html: event.description }}